Unique Email Transform Generator

Hi Team,

I am trying to create a transform which should pick the patterns on priority as below

  1. [email protected]
  2. [email protected]
  3. $fi.$ln(uniquecounter)@mail.com

The problem is if two users are having same firstname and lastname this transform still populate the same email for both users, as they are not null.

How can i construct the transform as such it should check unique values too. Is this possible?
Below is the snippet I’m using to achieve this but it is not working as expected.Can you please help


{
  "attributes": {
    "values": [
     {
         "attributes": {
        "firstInitial": {
            "type": "substring",
            "attributes": {
                "input": {
                    "type": "accountAttribute",
                    "attributes": {
                        "attributeName": "firstName",
                        "sourceName": "Staff Joiner"
                    }
                },
                "begin": 0,
                "end": 1
            }
        },
        "lastName": {
            "type": "identityAttribute",
            "attributes": {
            "name": "lastname"
                        }
            },
         "middleInitial": {
            "type": "substring",
            "attributes": {
                "input": {
                    "type": "accountAttribute",
                    "attributes": {
                        "attributeName": "middleName",
                        "sourceName": "Staff Joiner"
                    }
                },
                "begin": 0,
                "end": 1
            }
        },
        "value": "[email protected]"
    },
        "type": "static"
      },
	     {
         "attributes": {
        "firstInitial": {
            "type": "substring",
            "attributes": {
                "input": {
                    "type": "accountAttribute",
                    "attributes": {
                        "attributeName": "firstName",
                        "sourceName": "Staff Joiner"
                    }
                },
                "begin": 0,
                "end": 1
            }
        },
        "lastName": {
            "type": "identityAttribute",
            "attributes": {
            "name": "lastname"
                        }
            },
         "middleInitial": {
            "type": "substring",
            "attributes": {
                "input": {
                    "type": "accountAttribute",
                    "attributes": {
                        "attributeName": "middleName",
                        "sourceName": "Staff Joiner"
                    }
                },
                "begin": 0,
                "end": 1
            }
        },
        "value": "[email protected]"
    },
        "type": "static"
      },
	  
	  {
         "attributes": {
        "firstInitial": {
            "type": "substring",
            "attributes": {
                "input": {
                    "type": "accountAttribute",
                    "attributes": {
                        "attributeName": "firstName",
                        "sourceName": "Staff Joiner"
                    }
                },
                "begin": 0,
                "end": 1
            }
        },
        "lastName": {
            "type": "identityAttribute",
            "attributes": {
            "name": "lastname"
                        }
            },
         "middleInitial": {
            "type": "substring",
            "attributes": {
                "input": {
                    "type": "accountAttribute",
                    "attributes": {
                        "attributeName": "middleName",
                        "sourceName": "Staff Joiner"
                    }
                },
                "begin": 0,
                "end": 1
            }
        },
        "value": "[email protected]"
    },
        "type": "static"
      }
    ]
  },
  "type": "firstValid",
  "name": "DelimitedEmailTransform"
}

DelimitedEmailTransform.txt (3.6 KB)

Sorry was not able to upload the snippet correctly hence uploaded json file format

Do you mind cleaning up the contents of your post as right now it seems like your transform content is duplicated in the post… one inside the Preformatted text and one outside

Hi Nithesh,

I was not able to upload the snippet, so i have just added it as a json format.Can you please look into it once?

Your transform is firstValid which will always return the first option as it will always be valid as per firstValid conditions

Have a look at this

I think this is what you need to use

Yes, I had considered this firstly, but in some post i read that username generator cannot be used for all the attributes. It can only be used for deriving accountid.
Please find the details for the same in below link.Is this correct? Can you please confirm?
usernameGenerator Transform - IdentityNow (IDN) / Discussion and Questions - SailPoint Developer Community Forum

This solution may not work for me as again i have to do a pattern check.

@sindhu_v_murthy is this transform for use in an identity profile mapping or a create account profile? If it’s for a create account profile then you can use the “Create Unique LDAP Attribute” generator to generate unique account attributes for more than just the username. In your “Create Account” page on your source, configure the email attribute as follows. You will need to make sure there is an identity attribute that gets the first initial of the first name so you can use it in your pattern.

No, I require transform to be added in Identity Profile page. Is there any solution that I can use?

Also, even if I use Create Unique LDAP Attribute, I can only add one type of pattern here, but instead I need the transform to pick 3 patterns as mentioned in above points.

You would need a custom rule to make that work in an identity profile mapping.

2 Likes

Ahh okay! let me try to explore this and see how can I make it work. Thanks for the suggestion

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.