Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Auto Increment of account name in Azure AD using JSON

Smiling
Regular Contributor
Regular Contributor

Hey, 

I am working on use case where I need to Modifiy create acount json where I need to specify Auto Increment of account name. I seriously don't know how to do it. I have gone through the rest connector documentation but I didn't find anything. Do you guys have any reference/idea how to do it. 
I have menetion CreateAccountJSON below

CreateAccountJSON 

{
"accountIdPath": "call1.message.id",
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
"responseColsToPropsMap": {
"name": "call1.message.userPrincipalName~#~char",
"displayName": "call1.message.name~#~char",
"updatedate": "call1.message.modified_at~#~date",
"comments": "call1.message.login~#~char"
},
"call": [
{
"name": "call1",
"connection": "userAuth",
"showResponse":true,
"url": "https://graph.microsoft.com/v1.0/users",
"httpMethod": "POST",
"httpParams": "{\"accountEnabled\":true,\"displayName\":\"${user.displayname}\",\"mailNickname\":\"${user.firstname}\",\"userPrincipalName\":\"${user.firstname}_${user.lastname}.@xyz.onmicrosoft.com\",\"passwordProfile\":{\"forceChangePasswordNextSignIn\":true,\"password\":\"XYZ@123\"},\"givenName\":\"${user.firstname}\",\"jobTitle\":\"${user.departmentname}\",\"mail\":\"${user.firstname}_${user.lastname}@xyz.onmicrosoft.com\",\"mobilePhone\":\"${user.phonenumber}\",\"officeLocation\":\"${user.location}\",\"preferredLanguage\":\"en-US\",\"surname\":\"${user.lastname}\",\"usageLocation\":\"US\",\"department\":\"${requestAccessAttributes?.get('department')}\",\"employeeid\":\"${user.employeeid}\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201
]
}
}
]
}

2 REPLIES 2

Dhruv_S
Saviynt Employee
Saviynt Employee

Hi @Smiling 

You can try using the account name rule with auto increment option. Please refer to the below links for your reference.

Creating Endpoints (saviyntcloud.com) --> Account Name Rule

Account Naming Rule - auto increment not computing - Saviynt Forums - 36050

Let us know if you have any questions.

Regards,

Dhruv Sharma

 

rushikeshvartak
All-Star
All-Star

 

Use Account Name Rule configuration under Endpoints. You can use dataset for auto increment.

Auto-incrementing account name

You can set up auto-increment for the username by using the FN_EIC_SEQGEN DB function and the default dataset, SEQUENCE_GEN_MAPPING, that consists the identifier (against which the counter is stored) and id (stores the value of the counter every time the DB function is used). For more information, see .

To use this DB function for storing the counter, specify the following in the Advanced Config query field:

FN_EIC_SEQGEN('identifier') 

Documentation : https://docs.saviyntcloud.com/bundle/EIC-Admin-v23x/page/Content/Chapter02-Identity-Repository/Creat...


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.