Skip to main content

Naming Convention

Naming conventions are used to enforce a consistent naming strategy for teams created by end users in your organization. This helps in identifying the function of the team, membership, geographic region, or who created the team. It can also be helpful in categorizing teams and underlying groups in the address book.
Intrinsically, naming conventions are a combination of values and expressions that are evaluated against a user profile and a request form, which defines the final value of fields.

Available tags

Naming conventions can use information coming from the user profile and the user request form through the following tags.


Be careful: These tags are CASE-SENSITIVE!

Request Form

TagDescription team name team description team welcome message
request.template.nameRequested template name
request.request.requester.nameRequester name (Same as user.displayName)
request.request.requester.emailRequester email (user.mail)

User Profile (Active Directory attributes)

user.displayNameUser full name. (for example "Bob Dirac")
user.userPrincipalNameUser UPN. In Active Directory, a User Principal Name (UPN) is the name of a system user in an email address format. A UPN (for example: "") consists of the user name (logon name), separator (the @ symbol), and domain name (UPN suffix).
❗ A UPN is not the same as an email address. Sometimes, a UPN can match a user's email address, but this is not a general rule.
user.mailUser email (for example: "")
user.preferredLanguageUser preferred language in Microsoft 365.
Language and locale codes are limited to those in the ISO 639-1 standard.
user.givenNameUser given name (for example: "Bob")
user.countryUser country (for example: "France")
user.companyNameUser company name (for example: "Contoso")
user.departmentUser department (for example: "Marketing")
user.cityUser city (for example: "Paris")
user.jobTitleUser job title (for example: "Product Manager")
user.surnameUser surname (for example: "Dirac")
user.usageLocationOffice 365 usage location. (for example: "US")
Rely on the ISO 3166-1 alpha-2 country codes...

App Registration

app.idApplication ID as defined during the app registration in Azure.
app.nameApplication name as defined during the app registration in Azure.

Common scenarios

In addition to tags, naming conventions can use standard javascript operators and functions.


Naming conventions follows the EJS syntax

Examples: Static naming convention

"Add a "PRJ-" prefix to project management teams"

PRJ-<%= %>
<%= %>-MKT
<%= %> - #marketingcampaign #retargeting #seo

Examples: Dynamic naming convention

"Generate a unique name based on the current date"

<%= %>-<%= %> // Returns the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.. Example: `1592241059000`


<%= %>-<%= new Date().getTime() %> // Returns the current date and time in the ISO 8601 format. Example: `2020-06-15T17:09:51.312Z`

"Add country as a suffix to teams names based on the requester location"

<%= %> - <%= user.usageLocation %>

"Add the Business Solution name to description"

<%= %> - Created from the "<%= %>" team template.

Examples: Conditional naming convention

"Use a specific suffix for users from a specific domain, use the domain name for the others"

<%= %> - 
<% if (user.mail.includes('')) { %>
CT France // Use "CT France" instead of
<% } else { %>
<%= user.mail.replace(/.*@/, '') %> // Extract domain name from user email address
<% } %>

Azure AD Schema Extension

To use Azure AD schema extensions in your naming conventions, please refer to this article


Team Name Length

The maximum team name length (including prefix, suffix, etc...) is fixed to 264 characters, which is the limit of the underlying group name.


This limit is validated by adding the lengths of BOTH the requested team name AND the dynamic naming convention!

Special characters

The following characters are forbidden in teams names:

" * : < > ? / \

You can use " - " or " | " as separators.