If you are planning on commencing a new project to introduce Gender Pronouns in Microsoft 365 you may want to consider using Pronouns on your profile in Microsoft 365
This project is a collection of scripts that will allow you to add a Pronoun field to your Microsoft 365 tenant. Once set up users will be able to update their preferred pronoun from their Microsoft 365 Profile and have it appear in the Microsoft 365 Profile card.
Often, people make assumptions about the gender of another person based on the person’s appearance or name. These assumptions aren’t always correct, and the act of making an assumption (even if correct) sends a potentially harmful message -- that people have to look a certain way to demonstrate the gender that they are or are not.
Just as it can be offensive or even harassing to make up a nickname for someone and call them that nickname against their will, it can be offensive or harassing to guess at someone’s pronouns and refer to them using those pronouns if that is not how that person wants to be known.
This kit is a collection of scripts and guidance to help you add the Pronoun field to the user profile of your Microsoft 365 tenant.
To add the Pronoun to the user profile card and allow users to edit the field requires connecting a few different components in Office 365.
Displays the Pronoun field in the Microsoft 365 Profile Card. This profile card shows up in Outlook, SharePoint, Delve and most other Microsoft 365 services.
The Profile Card can display from a limited set of user attributes from Azure Active Directory. Namely extensionAttribute1 through extensionAttribe15.
The first choice that needs to be made is to select the extensionAttribute in Azure Active Directory that is going to be reserved for the Pronoun in your organization.
Now that the Pronoun is being displayed in the Profile Card we need to provide a way for users to set their own Pronoun.
The SharePoint user profile provides a seamless experience for users to navigate from the profile card to the edit experience. Unfortunately there is no out of the box solution to update the Azure Active Directory Pronoun attribute. Administrators will need to set up a process sync the Pronoun attribute from SharePoint to Azure Active Directory. The Invoke-PronounSync.ps1 script can be used to automate this process.
Note: Using the SharePoint Profile is optional, especially if Azure Active Directory Connect is being used to sync the extension attributes. If attributes are being synced from Active Directory and mastered in an HR system it makes sense to have the HR system provide the interface to edit the Pronoun and have that update the extensionAttribute. Alternative options to edit the user profile can be implemented including a PowerApp or a custom SharePoint page to directly update the Pronoun attribute in Azure Active Directory.
This script adds the Pronoun attribute to the Microsoft 365 Profile Card in your tenant.
.\Set-ProfileCardPronoun.ps1 -PronounAttribute 'extensionAttribute1'
Note: It can take up to 24 hours after this command is run for the profile card to be updated in Outlook
To provide an edit experience for the Pronoun field users To allow users to edit the Pronoun field in SharePoint and Delve it needs to be created in the User Profile store. Unfortunately there is no API available to automate the creation of properties in the SharePoint User Profile.
Follow the steps below to create the Pronoun field in SharePoint.
This application ('User Pronoun Sync App') will be created with the appropriate application permissions for running the daily sync job. This sync job will copy the user's Pronouns from SharePoint/Delve to Azure AD.
Install-Module PnP.PowerShell -Scope CurrentUser
Register-PnPAzureADApp -ApplicationName 'User Pronoun Sync App' -Tenant {tenant-name}.onmicrosoft.com -GraphApplicationPermissions 'User.ReadWrite.All' -SharePointApplicationPermissions 'User.Read.All' -DeviceLogin
Note the Client Id / Application Id of the app that was created in the previous step. This will be used as the ClientId when running Invoke-PronounSync. The .pfx created in the previous step needs to be stored securely.
Update the parameters below and run the script.
.\Invoke-PronounSync.ps1 -Tenant {tenant-name}.onmicrosoft.com -Url 'https://{tenant-name}-admin.sharepoint.com' -ClientId {ClientId of User Pronoun Sync app created above} -CertificatePath .\PnPPowerShell.pfx -PronounAttribute 'extensionAttribute1'
Once the sync is run successfully you can set it up on your platform of choice to run on a daily schedule. Options for automation may include
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.