How to create a group naming policy in Microsoft Entra ID
Some time ago, I published a post on best practices associated with the site/group naming convention in SharePoint and Microsoft 365. What if, after reading that article, you decided to enforce some sort of convention? Well, you came to the right spot; let me explain how this works and how you can create a group naming policy in Microsoft Entra ID.
SharePoint site name best practices
Before we get into the technical steps, perhaps it would make sense to get familiar with some best practices for site name/group name conventions. Check out this article first.
What is Microsoft Entra ID?
In case you are confused by the name, Entra ID is the new name for the Azure Active Directory, which I blogged about previously. It is an Admin location where Administrators can manage users, security groups, devices, etc.
How to create a group naming policy in Microsoft Entra ID
-
- You must be a Global Microsoft 365 Admin or Microsoft Entra ID Admin to do this
- From Microsoft 365 App Launcher, choose Admin
- Under Admin centers, click Identity
- Once in the Microsoft Entra Admin Center, click Groups > Group settings
- Under Settings, click on Naming policy
- There are 2 things you can configure here: Blocked words and Group naming policy. For the Blocked words, download the CSV file, update it with blocked words, and reupload.
- If you want to set up a Group naming policy, click on the Group naming policy tab.
- You can add prefixes and suffixes to the group name. Prefixes/Suffixes can be based on attributes/properties from Entra ID (Azure AD) or fixed strings.
- In my case, I added Attribute Country, followed by string “-” as a prefix, and string “-” followed by Department Attribute as a suffix
- Click the Save button to save the changes to the policy. You will receive a confirmation message.
User Experience
Once the user tries to create a Team Site in SharePoint or a Team in Teams, the group naming policy will make the appropriate corrections. For example, in the example below, a user tried to create a Team site using some profanity words that were on a Blocked list.
Likewise, once the user tries to create a SharePoint Team Site, it adjusts the name accordingly per the group naming policy.
Important Notes
- Group Naming policy is not enforced on users with the Global Admin role. So, if you are an admin and create a group, the policy will not apply to you. It only applies to regular users.
- For the group naming policy to work, you must have all the proper attributes/properties defined for your users in Microsoft Entra ID (i.e. Country, Department, etc.)
- The group naming policy applies to all Microsoft 365 Groups, no matter how they are created. So if someone creates a Team Site in SharePoint or a Team in MS Teams, or plan in Planner, etc, the Group naming policy applies to all these scenarios
- Group naming policy only applies to Team Sites, since those are connected to Microsoft 365 Groups. The policy does not apply to Communication Sites.