Jan 14 2018
02:33 PM
- last edited on
Jan 14 2022
05:27 PM
by
TechCommunityAP
Jan 14 2018
02:33 PM
- last edited on
Jan 14 2022
05:27 PM
by
TechCommunityAP
Hallo,
when I use this powershell code
$User = Get-AzureADUser -Filter "userPrincipalName eq 'Mail'"
$User.country
I get as Output "GERMAY". How I have to change the code to get "DE" (2 letter ISO code) as output.
Thanks
Stefan
Jan 17 2018 07:51 AM
The abbreviated ones represent the "c" attribute, but if I remember correctly that one is never surfaced in AAD/Graph. Instead, you can simply make your own mapping in accordance to ISO 3166-2 (https://en.wikipedia.org/wiki/ISO_3166-2) or just "borrow" some of the code samples available online 🙂