We're implementing Microsoft 365's new pronouns feature, and we need to be able to sync this user-provided data back to our Active Directory environment. According to the admin documentation, these pronouns "are stored with other data in the user's Exchange mailbox."
However, when I use Get-Mailbox
(using the ExchangeOnlineManagement
module, version 3.2.0 Preview2
), I'm not seeing the pronoun data anywhere (using Get-Mailbox user@example.com | Select *
).
I'm not able to find any PowerShell-related documentation for this feature. Would anyone be able to either:
Thanks in advance for any advice you can give me!
I found that the pronouns were being retrieved from https://nam.loki.delve.office.com/api/v2/extendeduserinfo/pronouns
with POST requests. Not sure if the nam
or loki
parts of the URL are static or specific to our tenant.
Unfortunately, it looks like this part of the Delve app isn't made public with the Graph API (at least not yet). So, I ended up creating an internal app for our company that iterates over each user and does the following:
loki.delve.office.com
and retrieves the token value using the keyConvertGetPost=true
aadObjectId=<oid>
(replacing <oid>
with the object ID of the target Azure AD user{
"accept": "application/json",
"Content-Type": "application/json",
"authorization": "<token that was retrieved above>"
# these next two are required, will throw a 500 error without them
"X-ClientType": "MicrosoftTeamsAngular",
"X-HostAppRing": "general",
}
{
"id": "<oid of the target Azure AD user>",
# note that the preceding space is not a typo
"displayName": " He/Him",
"allowedAudiences": "Organization"
}
These attributes are then assigned to the user in a custom field that can be used by other applications.
Not sure if we'll be able to open-source the tool, but if not, hopefully the above will be able to point anyone else in the right direction.