Use PowerShell or the Portal to Configure Office 365 Groups Naming Policy
The naming policy for Office 365 Groups allows tenants to enforce a naming policy for new Office 365 Groups created by users through group-enabled applications like Teams, Outlook, Planner, Stream, and Yammer. The policy does not apply to groups created by administrators.
Since 2016, administrators have configured the naming policy through PowerShell. Now they’ve released a preview to do the same job in the Azure Active Directory portal (Figure 1). Go to the groups section of the portal and you’ll find the naming policy listed under Settings.

There’s no doubt that configuring policy settings through a GUI is much easier than messing around with PowerShell, especially given the somewhat cryptic steps needed to manipulate policy settings for Azure Active Directory policy objects. Apart from setting prefix and suffix variables to add to user-provided names, the portal also allows you to manage blocked words. These are words that you don’t want people to use in group names. Some of the words are functional, like “Payroll” and “CEO,” and some are offensive terms.
Policy Not Retrospective
Remember that the Groups Naming Policy only applies to new groups and doesn’t apply its naming standard retrospectively to old groups. If you want to use the new standard with old groups, you’re going to have to write some PowerShell. Thankfully, this is relatively easy (see Chapter 12 of Office 365 for IT Pros for some hints and sample code).
Premium AAD Feature
Using the Office 365 Groups Naming policy is a premium Azure Active Directory feature requiring users to have Azure Active Directory Premium P1 licenses. Given the revelation at Microsoft’s FY19 Q3 earnings call that Enterprise Mobility and Security has 100 million users (much of the enterprise Office 365 population), this shouldn’t be much of a problem for the organizations that need policies like this to exert control over group sprawl.
For information about the policies used to control Office 365 Groups, read Chapter 12 of the Office 365 for IT Pros eBook.