I'm looking to change the display name format for users in Azure Active Directory (AAD) from LastName, FirstName to FirstName LastName, while keeping it as LastName, FirstName in our Active Directory (AD). We use the Azure AD sync tool, and I've seen some conflicting advice about creating a custom transformation rule for this. Has anyone succeeded in doing this? Are there any potential issues I should be aware of, and could you share your rule if you have it?
4 Answers
Why do you want to keep different formats in AD and AAD? It might lead to confusion. A lot of people find it simpler to match the two formats, but I get that you want to make them look good in Teams. If people are adamant about having display names formatted differently, that might just complicate things even more.
You might also want to think about scripting this process through PowerShell along with Microsoft Graph. Pull the first name and surname and set them as variables to create the display name. It's quite efficient if you ask me!
I think this whole situation sounds like a real headache! If IT prefers one format and users another, it can lead to a mess. But at the end of the day, you’ve got to consider what works best for the users, even if it complicates things on the backend.
To achieve your goal, you should set up an inbound synchronization rule. For the displayName attribute, you can use an expression similar to this: IIF(IsPresent(givenName) && IsPresent(sn), givenName & " " & sn, NULL). Just ensure this only applies to users with both givenName and sn. It’ll keep things tidy without any extra spaces or errors.
Absolutely! And if you're looking for concrete examples, check this [link](https://learn.microsoft.com/en-us/encrypt/information-to-protect-your-systems). It should help clarify the syntax.
I totally see your point! But since they want proper names displayed in Teams, having a mix could be painful. It’s all about balancing the preferences at that point.