Changing the Display Name Format In Microsoft Teams From Last, First to First, Last

In Microsoft Teams, the name of your internal contacts is displayed in the format found in the displayName field in Azure AD. For some organizations this is never an issue. However, some larger and older organizations still use the Last name, First name as their display name format.

This format dates back to some perceived naming standard when application search was limited so ordering by surname meant that finding the right record was an easier task.

However, the modern day applications are now more capable in terms of searching and ordering of data, and applications are geared towards first name, last name formats as the new standard. This is especially the case where Microsoft Teams is concerned.

Why is this a problem in Teams?

The reason why last name, first name is not a great format for Teams is due to the way Teams interacts with you. Whilst in the application, you can forgive your name being shown as Jackson, Michael it is when you are not in Teams that potentially Teams becomes less friendly and more impersonal.

When you are not in Teams and someone sends you a chat, whether it is private or within a channel, you will get an email delivered to your inbox from Teams that will start Hi Jackson, Michael or in some cases I have seen just Hi Jackson,

Now to some users small things like this annoy them and cause unnecessary noise when you’re trying to deploy Teams and drive adoption. So its good practice to adopt the first name, last name standardization.

If you are synchronizing from your on-prem AD, then Azure is going to replicate your displayName format. Changing the format in on-prem AD puts most AD administrators off because they don’t want to screw up 200,000 accounts and work a long weekend restoring stuff. Understandable.

We also cannot do anything in AzureAD because the user accounts are synchronized and therefore editing in the cloud is prohibited.

So we have to do something in the middle.

We can do this using Synchronization Transformation Rules in AzureAD Connect. You can find this in your program start folder under Azure AD Connect

We want to use this to change the displayName format being sent from On-Premises AD to Azure AD

Using the filter, you can refine the transformation templates down to the user scope level out to AAD

This will give you a list of all the outbound rules for the user object to AzureAD. The one we are interested in is Out to AAD User Identity

Edit this rule. You will be given a warning saying this is a default rule and it is recommended to disable this and create a new one from it as a template. For Production, I recommend that you click yes as default rules may get reset each time AzureAD is updated. However, for the purpose of this demo, I clicked No to edit the default rule.

From the list of fields, we need to find the displayName. We need to change the flow type from DIRECT to Expression.

Then we want to add in the following expression

[givenName]&" "&[sn]

Save the rule.

After the rule has been saved, run the following PowerShell command to force a full synchronization

Start-AdSyncSyncCycle -PolicyType Initial

Once the new synchronization has completed, AzureAD will be updated in the new display name format

And in Teams their name will now be shown correctly

This will apply to all of Office 365 where the user’s display name is shown e.g. Exchange.


One thought on “Changing the Display Name Format In Microsoft Teams From Last, First to First, Last

Leave a Reply

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