In Microsoft 365, giving users the freedom to create groups in Outlook on the web, Microsoft Teams, or Viva Engage often leads to directory sprawl: unstandardized abbreviations, confusing group aliases, and duplicate departmental distribution lists.
To maintain a clean Global Address List (GAL) and prevent rogue naming, Microsoft provides two distinct naming policy systems:
- Exchange Online Distribution Group Naming Policy: Governs traditional distribution lists (DLs) and mail-enabled security groups.
- Microsoft Entra ID Group Naming Policy: Governs Microsoft 365 Groups, Teams, Yammer communities, and underlying SharePoint sites, supporting dynamic user attributes like
[Department]and[CountryOrRegion].
In this modernized guide, we explain how both policies work, how to configure automated prefix/suffix rules and blocked word lists, and how administrators bypass them.
Architectural Comparison: Exchange DL vs. Entra ID M365 Group Policies
| Feature | Exchange Online DL Policy | Microsoft Entra ID Group Policy |
|---|---|---|
| Governed Group Types | Traditional Distribution Groups & Mail-Enabled Security Groups | Microsoft 365 Groups, Microsoft Teams, SharePoint Team Sites |
| Licensing Requirement | Included with all Exchange Online plans | Microsoft Entra ID P1, Microsoft Entra Governance, or M365 E3/E5 |
| Supported Dynamic Attributes | [Department], [Company], [Office], [StateOrProvince], [CountryorRegion], [Title] | [Department], [Company], [Office], [StateOrProvince], [CountryorRegion], [Title] |
| Custom Blocked Words | Supported (stored in Exchange organization config) | Supported via CSV upload (up to 5,000 words) |
| Admin Bypass | Admins creating groups via EAC or PowerShell automatically bypass the policy | Global Admins, User Admins, and Intune Admins bypass the policy |
- User types name:
Project Titan - User profile:
Dept: Finance,Country: UK
- Inspects blocked words list (e.g.,
Payroll,HR) - Applies Prefix:
GRP_[Department]_ - Applies Suffix:
_[Country]
- Final Display Name: GRP_Finance_Project Titan_UK
- Consistent GAL sorting & Teams lifecycle
Part 1: Configure Microsoft Entra ID Group Naming Policy (Teams & M365 Groups)
The Entra ID policy is the primary mechanism for modern collaboration spaces.
Method A: Via the Microsoft Entra Admin Center
- Sign in to the Microsoft Entra admin center (
entra.microsoft.com). - Navigate to Identity > Groups > Settings > Naming policy.
- Under the Naming policy tab:
- Click Add prefix (choose either a static String like GRP_ or an Attribute like [Department]).
- Click Add suffix (e.g., _[CountryOrRegion]).
- A live preview displays: GRP_[Department]_<GroupName>_[CountryOrRegion].
- Navigate to the Blocked words tab:
- Upload a .csv file containing terms you want to forbid users from using (e.g., CEO, Payroll, HR, Executive, Admin). Maximum file size is 50 KB (approx. 5,000 words).
- Click Save.
Part 2: Configure Exchange Online Distribution Group Naming Policy
For traditional distribution lists, configure the policy in Exchange Online PowerShell:
1. Connect to Exchange Online PowerShell
Connect-ExchangeOnline -UserPrincipalName [email protected]
2. Inspect the Current Policy
Get-OrganizationConfig | Select-Object Name, DistributionGroupNamingPolicy
3. Apply a Prefix / Suffix Rule
The policy format uses<Prefix><GroupName><Suffix>. Attributes are wrapped in standard brackets:
# Example: DL_<Department>_<GroupName>_Users
Set-OrganizationConfig -DistributionGroupNamingPolicy "DL_[Department]_<GroupName>_Users"
If a user in the Sales department creates a group named WestCoast, the final name created in the directory will be:
DL_Sales_WestCoast_Users
4. Configure Blocked Words in Exchange Online
To prevent users from creating distribution groups containing sensitive or reserved terms:# Set comma-separated blocked words
Set-OrganizationConfig -DistributionGroupNameBlockedWordsList "CEO","Payroll","HumanResources","Helpdesk","Executive"
# Verify the blocked words list
(Get-OrganizationConfig).DistributionGroupNameBlockedWordsList
Important Rules and Constraints
- Character Limit: The total display name length—including prefixes, suffixes, and the user's chosen name—cannot exceed 64 characters for distribution groups (and 256 characters for Entra ID M365 Groups).
- Missing Attribute Fallback: If a user's account has a blank
Departmentattribute in Entra ID, the policy will simply drop that attribute from the name string rather than failing the creation. - Admin Exemption: Administrators creating groups through the Exchange Admin Center (EAC), Entra Admin Center, Microsoft 365 Admin Center, or PowerShell are exempt from naming policies. This allows IT teams to provision executive or global distribution lists without prefixes.
- Existing Groups Are Not Renamed: Naming policies apply only to new groups created after the policy is enabled. Existing groups retain their current names unless an administrator renames them.
How to Remove or Reset Naming Policies
If you need to decommission or reset group naming policies:
# Reset Exchange Online Distribution Group Naming Policy
Set-OrganizationConfig -DistributionGroupNamingPolicy $null
Set-OrganizationConfig -DistributionGroupNameBlockedWordsList $null
# Verify removal
Get-OrganizationConfig | Select-Object DistributionGroupNamingPolicy, DistributionGroupNameBlockedWordsList