Hi All,
We’ve use case to provision users to Azure AD from Workday, we already have rule in place for calculating userPrincipalName. As mailNickname is mandatory attribute for creating accounts in Azure AD I used transform in Create Account profile as we’ve UPN with @domain.com I tried using Replace transform to remove but I’m getting error as “sailpoint.connector.ConnectorException: Exception occurred. Error message - HTTP not ended OK. Response Code - 400 Error - Invalid value specified for property \u0027mailNickname\u0027 of resource \u0027User\u0027.” Can anyone assist on this below?
{
"name": "mailNickname",
"transform": {
"attributes": {
"mnickname": {
"attributes": {
"input": "$userPrincipalName",
"regex": "@domain.com",
"replacement": " "
},
"type": "replace"
},
"value": "$mnickname"
},
"type": "static"
},
"attributes": {
"cloudRequired": "true"
},
"isRequired": false,
"type": "string",
"isMultiValued": false
}
Hi @vasanthrajsp29 ,
can you check if the mailNickname contains spaces or special characters, if yes you must remove it.
Also, the alias (part before the @) couldnt be max of 64 and must be unique in all azure tenant
1 Like
neeraj99
(Neeraj Nautiyal)
July 17, 2024, 3:13pm
3
Vasanth Raj S P:
We’ve use case to provision users to Azure AD from Workday, we already have rule in place for calculating userPrincipalName. As mailNickname is mandatory attribute for creating accounts in Azure AD I used transform in Create Account profile as we’ve UPN with @domain.com I tried using Replace transform to remove but I’m getting error as “sailpoint.connector.ConnectorException: Exception occurred. Error message - HTTP not ended OK. Response Code - 400 Error - Invalid value specified for property \u0027mailNickname\u0027 of resource \u0027User\u0027.” Can anyone assist on this below?
copied!
Hi @vasanthrajsp29 try the below one
Changed replacement from "replacement":" "
to "replacement":""
So there was an space in the replacement that will be added in place of @domain.com
{
"name": "mailNickname",
"transform": {
"attributes": {
"mnickname": {
"attributes": {
"input": "$userPrincipalName",
"regex": "@domain.com",
"replacement": ""
},
"type": "replace"
},
"value": "$mnickname"
},
"type": "static"
},
"attributes": {
"cloudRequired": "true"
},
"isRequired": false,
"type": "string",
"isMultiValued": false
}
Alternatively i will suggest a split transform considering you are using UPN and it will always have something like: [email protected]
You can use the below code:
which splits based on the @ symbol and gets anything previous to it. This is fail-safe in case of empty value coming in.
{
"name": "Split to get username",
"type": "split",
"attributes": {
"input": {
"type": "static",
"attributes": {
"value": "[email protected] "
}
},
"delimiter": "@",
"index": 0,
"throws": false
}
}
This prints support
Hope this helps,
1 Like
or with your referecne:
{
"name": "Split to get username",
"transform": {
"type": "split",
"attributes": {
"input": {
"type": "reference",
"attributes": {
"name": "userPrincipalName"
}
}
},
"delimiter": "@",
"index": 0,
"throws": false
}
}
Hi @phil_awlings ,
Thanks for response, It was helpful.
1 Like
system
(system)
Closed
September 27, 2024, 9:40am
6
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.