function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Parth Patel 184Parth Patel 184 

Integrating Azure AD with Salesforce queries/issues for assigning role

Hello there,
I was able to successfully use an constant value in the Azure AD mappings to 

User-added image
The above works fine during the sync, but what I need to do is If the profile is x role is y else z kind of expression. 
So, in the below I have used expression to do that.
IIF(SingleAppRoleAssignment([appRoleAssignments])="International", "Admin", "International")
User-added image
Which never works. What field from Azure AD user object should we use to assign this using an expression?

I guess the user object field appRoleAssignments i am using is not right. What should I be using?

Has any one worked on this before?

SwethaSwetha (Salesforce Developers) 
HI Parth,
This appears more of Azure related query than salesforce. I see you are using SingleAppRoleAssignment.
As per the doc (https://docs.microsoft.com/en-us/azure/active-directory/app-provisioning/functions-for-customizing-application-data#singleapproleassignment) ," Note that the best practice is to ensure only one appRoleAssignment is assigned to one user at a time, and if multiple roles are assigned the role string returned may not be predictable." You might want to check with Azure support team for more inputs on your ask

Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you