A cloud-based identity and access management service for securing user authentication and resource access
Yep - you should be able to use Microsoft Graph to manage Microsoft 365 pronouns, but there are two separate pieces. The organization-level setting determines whether pronouns are enabled and displayed throughout the organization, while the individual user's pronoun value is stored as part of that user's profile.
A Global Administrator or People Administrator can enable pronouns by using Microsoft Graph PowerShell. The required PowerShell module is Microsoft.Graph.Beta version 2.3.0 or later:
Install-Module -Name Microsoft.Graph.Beta -MinimumVersion 2.3.0
To check the current organization setting:
Connect-MgGraph -Scopes "PeopleSettings.Read.All"
Get-MgBetaAdminPeoplePronoun
To enable pronouns for the organization:
Connect-MgGraph -Scopes "PeopleSettings.ReadWrite.All","PeopleSettings.Read.All"
Update-MgBetaAdminPeoplePronoun -IsEnabledInOrganization:$true
To disable them:
Update-MgBetaAdminPeoplePronoun -IsEnabledInOrganization:$false
The organization-level REST endpoint is also available in Microsoft Graph v1.0. To retrieve the current setting:
GET https://graph.microsoft.com/v1.0/admin/people/pronouns
To enable pronouns:
PATCH https://graph.microsoft.com/v1.0/admin/people/pronouns
{ "isEnabledInOrganization": true }
Once enabled, users can optionally add and manage their pronouns through their Microsoft 365 profile card. The pronouns are displayed on profile cards within the organization.
For your requirement of centrally standardizing individual users' pronouns, enabling the organization setting is only the first step. It does not provide an administrative command that lets you specify a different pronoun for each user. The individual pronoun information is handled separately from the organization-wide pronoun setting.
For a single user, assuming the supported individual profile pronoun endpoint is available in your tenant, the PowerShell approach is:
Connect-MgGraph -Scopes "User.ReadWrite"
$user = "******@contoso.com" $pronouns = "he/him"
$body = @{ pronouns = $pronouns } | ConvertTo-Json
Invoke-MgGraphRequest -Method PATCH -Uri "https://graph.microsoft.com/beta/users/$user/profile/pronouns" -Body $body -ContentType "application/json"
You can verify the result with:
Invoke-MgGraphRequest -Method GET -Uri "https://graph.microsoft.com/beta/users/$user/profile/pronouns"
For multiple users, you could use a CSV so that the corporate format is explicitly controlled. For example:
UserPrincipalName,Pronouns
******@contoso.com,he/him
******@contoso.com,she/her
******@contoso.com,they/them
The corresponding script is:
Connect-MgGraph -Scopes "User.ReadWrite"
$users = Import-Csv ".\pronouns.csv"
foreach ($user in $users) { try { $body = @{ pronouns = $user.Pronouns } | ConvertTo-Json Invoke-MgGraphRequest -Method PATCH -Uri "https://graph.microsoft.com/beta/users/$($user.UserPrincipalName)/profile/pronouns" -Body $body -ContentType "application/json"
Write-Host "Updated $($user.UserPrincipalName) to $($user.Pronouns)" } catch { Write-Warning "Failed to update $($user.UserPrincipalName): $($_.Exception.Message)" }
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin