Azure Active Directory Group Naming Policy: Prefix or Suffix?

Azure Active Directory Group Naming

The Azure Active Directory (AAD) Group Naming Policy allows Office 365 tenants to control the format of the display names created for new Office 365 Groups. The policy is supported by applications such as Outlook. OWA, Teams, Planner, Yammer, and SharePoint Online. Only groups created by administrators are not covered by the naming policy.

The naming policy works by taking the name input by a user and creating a display name for the new Office 365 group based on the input name plus some values assigned by the policy. These values can be strings or attributes (such as department) taken from the creator’s AAD account and they can be added as a prefix to the group name or as a suffix, or indeed, as both. Multiple AAD attributes can be selected as long as the name generated does not exceed the maximum 256-character size of a display name. The golden rule is to always favor simplicity over complexity as the last thing you want is to generate group names that are too complicated for users to understand the group’s purpose.

The easiest way to update the AAD Group Naming Policy is through the AAD portal. You can also update the policy using PowerShell, but now that the GUI is available (Figure 3), use the portal. Note: The AAD Group Naming Policy is a premium feature and you should have AAD Premium P1 licenses for every member of a group that the policy applies to.

Updating the Azure Active Directory Group Naming Policy
Figure 1: Updating the Azure Active Directory Group Naming Policy

Prefix Preference Comes from Exchange Online; Suffix Might be Better for Teams

The original thinking about group names followed that of Exchange distribution lists and largely preferred using a prefix instead of a suffix to mark groups. The logic behind the choice is that this gathered all the groups together in one place in the Global Address List. (GAL) and other address lists.

Useful as this approach is for applications that use the GAL like Outlook Groups, the reasons for using a prefix are less valid for applications like Teams, Yammer, and SharePoint which also create Office 365 groups but don’t use the GAL. A suffix is often a better approach for these applications because it is less visually intrusive as the marking moves to the end of the screen space reserved by the application to list group names (like the list of teams shown to the left of the Teams client). The choice to use a prefix or suffix is therefore heavily influenced by the applications usage with the tenant.

For example, Figure 1 shows a set of Teams created using a group naming policy that generates display names with a prefix of “O365Grp-.” As you can see, some of the team names are hidden because not enough space is available to display the full name. You can hover over the team to see the name, but that requires a separate action.

Team names created using a prefix-based naming policy
Figure 2: Team names created using a prefix-based naming policy

Figure 3 shows the same set of teams, this time with display names generated by a policy that uses a suffix to mark Office 365 groups with ” (Team)” at the end of the user-supplied name. Some of the display name is still not visible, but the focus of the name shifts from the prefix to the reason why the team exists. This demonstrates why a suffix-based naming policy is often better for Teams.

Team names generated using a suffix-based naming policy
Figure 3: Team names generated using a suffix-based naming policy

Changing Group Names

If you already have a policy in action and decide to change from prefix-based to suffix-based, perhaps only for the Office 365 Groups with Teams, you’ll have to update the display names manually or using PowerShell. In this code snippet, we use the Get-Team cmdlet to find the set of Teams with a display name including the prefix and update the teams with a new display name by removing the prefix and adding a suffix.

# Update Office 365 Group Names that previously had an O365Grp- prefix to have a Teams suffix instead
$Teams = Get-Team | ?{$_.Displayname -Like "*O365Grp*"} | Select GroupId, DisplayName
$Suffix = " (Team)"
ForEach ($Team in $Teams) {
   $NewDisplayName = $Team.DisplayName.Split("-")[1] + $Suffix
   Set-Team -GroupId $Team.GroupId -DisplayName $NewDisplayName | Out-Null
   Write-Host $Team.DisplayName "updated to" $NewDisplayName }

For more information about managing Office 365 Groups, with or without PowerShell, read the Office 365 for IT Pros eBook.

4 Replies to “Azure Active Directory Group Naming Policy: Prefix or Suffix?”

    1. Thanks Dean. That change was actually made about 9AM my time this morning but it didn’t take for some reason. Done now (again).

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.