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

Required correct JSON format

Harish1
New Contributor II
New Contributor II

Hi,

We have a requirement that AD userprincipalname need to be update with @XYZ.com ( saviynt's email attribute needs to map with AD's Userprincipalname. We have multiple email domains i.e.,@AB.com, @CB.com but in AD's userprincipalname, domain needs to come as @XYZ.com only). Below is the sample JSON format we have used in the AD connection level. Please suggest correct format.

"userPrincipalName": "${(user.email.replace('@AB.com','@XYZ.com') || user.email.replace('@CD.com','@XYZ.com'))}",

 

5 REPLIES 5

rushikeshvartak
All-Star
All-Star

You need to use if else condition


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

Can you please suggest the right format using above attributes.

userPrincipalName": "${(user.email.replace('@AB.com','@XYZ.com').replace('@CD.com','@XYZ.com'))}",


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

pmahalle
All-Star
All-Star

Hi @Harish1 ,

Use if else with your condition. Below is the example of userprincipalname attribute with if-else.

"userPrincipalName" : "${if(user?.username!=null){user.username + '@dev.abc.com'}}


Pandharinath Mahalle(Paddy)
If this reply answered your question, please Accept As Solution to help other who may have a same problem. Give Kudos 🙂

sk
All-Star
All-Star

@Harish1 : Try below

"userPrincipalName": "${(user.email.split('@')[0])+'@XYZ.com'}",

 


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.