Hi @Sander Klaassen • Thank you for reaching out.
The problem is with the parameter ID
, which needs to be replaced with ExtensionID
. ID can only be used with built-in attributes. For extension attributes, you need to use Extension ID. So, rather than using 'ID' = 'extension_aa703c4e6def47f88d223d1141234567_uid'
, you need to use 'ExtensionID' = 'extension_aa703c4e6def47f88d223d1141234567_uid'
Below is an example of PowerShell cmdlet to create ClaimsMappingPolicy:
Set-AzureADPolicy -Definition @('{
"ClaimsMappingPolicy": {
"Version": 1,
"IncludeBasicClaimSet": "true",
"ClaimsSchema": [{
"Source": "user",
"ExtensionID": "extension_aa703c4e6def47f88d223d1141234567_uid",
"JwtClaimType": "uid"
}
]
}
}') -DisplayName "JWTClaimsPolicy" -Type "ClaimsMappingPolicy"
Read more: https://learn.microsoft.com/en-us/azure/active-directory/develop/active-directory-schema-extensions
-----------------------------------------------------------------------------------------------------------
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.