Issue when trying Custom Transform for userNameGenerator

Hi Team,

I am trying to use the below transform for generating unique username and have mapped it in create profile for distinguishedName attribute.However i am getting below error for this configuration.

{
	"attributes": {
		"cloudMaxSize": "100",
		"cloudMaxUniqueChecks": "5",
		"cloudRequired": "true",
		"template": "$distinguishedName"
	},
	"isRequired": false,
	"multi": false,
	"name": "distinguishedName",
	"transform": {
		"type": "usernameGenerator",
		"attributes": {
			"sourceCheck": true,
			"patterns": [
				"CN=$fi.$ln,OU=$ldc,OU=Users,OU=$lfc,OU=Staff,DC=ds,DC=leeds,DC=ac,DC=uk", "CN=$fi.$ln,OU=$ldc,OU=Users,OU=$lfc,OU=Staff,DC=ds,DC=leeds,DC=ac,DC=uk", "CN=$fn.$mi.$ln${uniqueCounter},OU=$ldc,OU=Users,OU=$lfc,OU=Staff,DC=ds,DC=leeds,DC=ac,DC=uk"
			],
			"fn": {
				"type": "identityAttribute",
				"attributes": {
					"name": "firstname"
				}
			},
			"ln": {
				"type": "identityAttribute",
				"attributes": {
					"name": "lastname"
				}
			},
			"ldc": {
				"type": "identityAttribute",
				"attributes": {
					"name": "legacyDepartmentCode"
				}
			},
			"lfc": {
				"type": "identityAttribute",
				"attributes": {
					"name": "legacyFacultyCode"
				}
			},
			"fi": {
				"type": "substring",
				"attributes": {
					"input": {
						"type": "identityAttribute",
						"attributes": {
							"name": "firstname"
						}
					},
					"begin": 0,
					"end": 1
				}
			},
			"mi": {
				"type": "substring",
				"attributes": {
					"input": {
						"type": "identityAttribute",
						"attributes": {
							"name": "middlename"
						}
					},
					"begin": 0,
					"end": 1
				}
			}
		}
	},
	"type": "usernameGenerator"
}

Is there anything else that i am missing?

Increase this value to more than 100. From your screenshot it appears that the DN was cut short. You can also verify this from account activity and check the value being sent.

Also, i would recommend increasing cloudMaxUniqueChecks to atleast 10 or more.

Changed “cloudMaxSize”: “200”, and “cloudMaxUniqueChecks”: “15”, but still same error.
In account activity it is sending the full value too
image

In Identity cube I see this error coming up. Is there any configuration missed from my end?

There seems to be issue with your DC, the screenshot says “Failed to find connection settings for the dc=ds,dc=leeds,dc=ac,dc=uk” , please verify that DC and OU exist in same hierarchy on your target AD system.

I did check the OU and configured it accordingly however i am encountering this below error. I was trying to test it by adding it as transform in identity attribute and check but still this error is being thrown

Hi @sindhu_v_murthy,

Please attach your updated transform for a smooth resolution.

Thanks!

I tried creating this transform and check for attributes, but guess I was wrong.
I have configured Custom Transform as below in Create Profile and trying to provision an account for users from identity profile provisioning.
{
“attributes”: {
“cloudMaxSize”: “200”,
“cloudMaxUniqueChecks”: “15”,
“cloudRequired”: “true”,
“template”:“$distinguishedName”
},
“isRequired”: false,
“multi”: false,
“name”: “distinguishedName”,
“transform”: {
“type”: “usernameGenerator”,
“attributes”: {
“sourceCheck”: true,
“patterns”: [
“CN=$fi.$ln,OU=$lfc,OU=Users,OU=$ldc,OU=Staff,OU=Sandbox,OU=IDM,DC=uol730,DC=local”
],
“fn”: {
“type”: “identityAttribute”,
“attributes”: {
“name”: “firstname”
}
},
“ln”: {
“type”: “identityAttribute”,
“attributes”: {
“name”: “lastname”
}
},
“ldc”: {
“type”: “identityAttribute”,
“attributes”: {
“name”: “legacyDepartmentCode”
}
},
“lfc”: {
“type”: “identityAttribute”,
“attributes”: {
“name”: “legacyFacultyCode”
}
},
“fi”: {
“type”: “substring”,
“attributes”: {
“input”: {
“type”: “identityAttribute”,
“attributes”: {
“name”: “firstname”
}
},
“begin”: 0,
“end”: 1
}
},
“mi”: {
“type”: “substring”,
“attributes”: {
“input”: {
“type”: “identityAttribute”,
“attributes”: {
“name”: “middlename”
}
},
“begin”: 0,
“end”: 1
}
}
}
},
“type”: “usernameGenerator”
},

I am encountering this error right now. Can you please help me with this?
image

Try this transform:

{
    "attributes": {
    "cloudMaxSize": "200",
    "cloudMaxUniqueChecks": "15",
    "cloudRequired": "true",
    "template":"$distinguishedName"
    },
    "isRequired": false,
    "multi": false,
    "name": "distinguishedName",
    "transform": {
        "type": "usernameGenerator",
        "attributes": {
            "sourceCheck": true,
            "patterns": [
                "CN=$fi.$ln,OU=$lfc,OU=Users,OU=$ldc,OU=Staff,OU=Sandbox,OU=IDM,DC=uol730,DC=local",
                "CN=$fi.$ln${uniqueCounter},OU=$lfc,OU=Users,OU=$ldc,OU=Staff,OU=Sandbox,OU=IDM,DC=uol730,DC=local"
            ],
            "fn": {
                "type": "identityAttribute",
                "attributes": {
                    "name": "firstname"
                }
            },
            "ln": {
                "type": "identityAttribute",
                "attributes": {
                    "name": "lastname"
                }
            },
            "ldc": {
                "type": "identityAttribute",
                "attributes": {
                    "name": "legacyDepartmentCode"
                }
            },
            "lfc": {
                "type": "identityAttribute",
                "attributes": {
                    "name": "legacyFacultyCode"
                }
            },
            "fi": {
                "type": "substring",
                "attributes": {
                    "input": {
                        "type": "identityAttribute",
                        "attributes": {
                            "name": "firstname"
                        }
                    },
                    "begin": 0,
                    "end": 1
                }
            },
            "mi": {
                "type": "substring",
                "attributes": {
                "input": {
                "type": "identityAttribute",
                "attributes": {
                "name": "middlename"
                }
                },
                "begin": 0,
                "end": 1
                }
            }
        }
    },
    "type": "usernameGenerator"
}

Please refer this link for more examples on the usage of this transform.

Thanks a lot @sharvari it worked for me, really appreciate this support.

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