usernameGenerator Transform

Hi,

I mapped the below transform for generating unique username in create profile for distinguishedName attribute.
it is generated dn like below.
CN=MNHLH, TtestN,OU=SailPoint,OU=Test OU Structure,DC=ss,DC=org is generated , but it is missed middlename
expected like this CN=MNHLH, TtestN G,OU=SailPoint,OU=Test OU Structure,DC=ss,DC=org

G is the middle name and it is not populated

And uniqueCounter also not working.

Is there anything that I missed.

{
	"attributes": {
		"cloudMaxSize": "100",
		"cloudMaxUniqueChecks": "25",
		"cloudRequired": "true"
	},
	"isRequired": false,
	"multi": false,
	"name": "distinguishedName",
	"type": "string",
	"transform": {
		"type": "usernameGenerator",
		"attributes": {
			"sourceCheck": true,
			"patterns": [
				"CN=$ln\\, $fn $mi,OU=SailPoint,OU=Test OU Structure,DC=ss,DC=org",
				"CN=$ln\\, $fn,OU=SailPoint,OU=Test OU Structure,DC=ss,DC=org",
				"CN=$ln\\, $fn,${uniqueCounter},OU=SailPoint,OU=Test OU Structure,DC=ss,DC=org",
				"CN=$ln\\, $fn $mi,${uniqueCounter},OU=SailPoint,OU=Test OU Structure,DC=ss,DC=org"
			],
			"ln": {
				"type": "substring",
				"attributes": {
					"input": {
						"type": "identityAttribute",
						"attributes": {
							"name": "lastname"
						}
					},
					"begin": 0,
					"end": 5
				}
			},
			"fn": {
				"type": "identityAttribute",
				"attributes": {
					"name": "firstname"
				}
			},
			"mi": {
				"type": "substring",
				"attributes": {
					"input": {
						"type": "identityAttribute",
						"attributes": {
							"name": "middleName"
						}
					},
					"begin": 0,
					"end": 1
				}
			}
		}
	}
}

Question - are you sure you have middleName attribute instead of middlename? second thing - did you verify if the identity you are using for tests does have this attribute populated?

middleName is correct and identity have a values.

If I keep only below pattern in the transform it works with middlename, without middlename will give issue.
“CN=$ln\, $fn $mi,OU=SailPoint,OU=Test OU Structure,DC=ss,DC=org”,

Hi,
Can you create an identity attribute and add the OU in the same and have the transform modified as below ?

{
“attributes”: {
“cloudMaxSize”: “100”,
“cloudMaxUniqueChecks”: “5”,
“cloudRequired”: “true”
},
“isRequired”: false,
“multi”: false,
“name”: “distinguishedName”,
“transform”: {
“type”: “usernameGenerator”,
“attributes”: {
“sourceCheck”: true,
“patterns”: [
“CN=$ln,$fn $mi,$ou”,
“CN=$ln,$fn,$ou”,
“CN=$ln,$fn${uniqueCounter},$ou”,
“CN=$ln,$fn $mi${uniqueCounter},$ou”
],
“fn”: {
“type”: “identityAttribute”,
“attributes”: {
“name”: “firstname”
}
},
“ln”: {
“type”: “substring”,
“attributes”: {
“input”: {
“type”: “identityAttribute”,
“attributes”: {
“name”: “lastname”
}
},
“begin”: 0,
“end”: 5
}
},
“ou”: {
“type”: “identityAttribute”,
“attributes”: {
“name”: “ou”
}
},
“mi”: {
“type”: “substring”,
“attributes”: {
“input”: {
“type”: “identityAttribute”,
“attributes”: {
“name”: “middleName”
}
},
“begin”: 0,
“end”: 1
}
}
}
}

}

try this

{
    "attributes": {
        "cloudMaxSize": "100",
        "cloudMaxUniqueChecks": "25",
        "cloudRequired": "true"
    },
    "isRequired": false,
    "multi": false,
    "name": "distinguishedName",
    "type": "",
    "transform": {
        "type": "usernameGenerator",
        "attributes": {
            "sourceCheck": true,
            "patterns": [
                "CN=$ln\\, $fn $mi,OU=SailPoint,OU=Test OU Structure,DC=saint-lukes,DC=org",
                "CN=$ln\\, $fn $mi${uniqueCounter},OU=SailPoint,OU=Test OU Structure,DC=saint-lukes,DC=org"
            ],
            "ln": {
                "type": "identityAttribute",
                "attributes": {
                    "name": "lastname"
                }
            },
            "fn": {
                "type": "identityAttribute",
                "attributes": {
                    "name": "firstname"
                }
            },
            "mi": {
                "type": "static",
                "attributes": {
                    "value": "#if($inValue != \"NO_MIDDLE_NAME\")$inValue.substring(0,1)#end",
                    "inValue": {
                        "type": "firstValid",
                        "attributes": {
                            "values": [
                                {
                                    "type": "identityAttribute",
                                    "attributes": {
                                        "name": "middleName"
                                    }
                                },
                                "NO_MIDDLE_NAME"
                            ]
                        }
                    }
                }
            },
            "oldmi": {
                "type": "substring",
                "attributes": {
                    "input": {
                        "type": "identityAttribute",
                        "attributes": {
                            "name": "middleName"
                        }
                    },
                    "begin": 0,
                    "end": 1
                }
            }
        }
    }
}

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