question

ScimUser-0802 avatar image
0 Votes"
ScimUser-0802 asked FrankHuMSFT-3200 answered

AzureAD SCIM integration with Country Code field

I've configured Azure AD with my SCIM endpoint to provision users. My mapping definition includes mapping the country code from the Azure country to addresses[type eq "work"].country, but provisioning fails for users whose country code is more than two characters long (e.g. USA instead of US). The failure on the SCIM endpoint indicates the country code is too long.

I see the SCIM spec (https://tools.ietf.org/html/rfc7643) says the country code must be in ISO 3166-1 "alpha-2" code format, so the SCIM endpoint rejecting this user sounds correct.

How can I configure Azure AD to either:

  1. Convert the 3 char country code to 2 char for transmission via the SCIM protocol (preferred), or

  2. Not send the country code field for users whose country code value violates the SCIM spec?



azure-active-directory
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hey @scimuser-0802 thanks for letting us know about this, I'm currently looking into this, as per the RFC it does appear that country codes should be in fact 2 letters.

0 Votes 0 ·

1 Answer

FrankHuMSFT-3200 avatar image
0 Votes"
FrankHuMSFT-3200 answered

It looks like this is an issue that can be fixed either by changing the source data or config on your server side,

Changing the source data part(values in AAD) is straightforward enough.
If you would like implement logic that says "If a user has USA, send US, if they have CAN send CA, etc.." then you will need to do that yourself.

You can use the Switch function for that.
https://docs.microsoft.com/en-us/azure/active-directory/manage-apps/functions-for-customizing-application-data#switch

However there are no current built in methods in Azure for this right now. I apologize for the inconvenience, I suggest submitting your feedback in regards to this here : https://feedback.azure.com/forums/169401-azure-active-directory and if there's enough community support the product team will put this on the roadmap to implement in the future.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.