Do NOT use diacritics in AAD user DisplayName!

Ondrej SebelaOndrej Sebela
1 min read

Table of contents

Friendly reminder: make yourself a favor and do NOT use diacritics in the 'Display Name' attribute of your Azure AD users!

Why?


Problem

  • Application installers invoked from the user profile will terminate immediately without any warning
  • Probably other similar problems related to applications invoked from the user profile will follow

Cause

  • Diacritics in Windows user profile name
    • If AAD user logs in to Windows AAD joined device, a user profile named in the form user-display-name-without-spaces gets created (i.e. user 'Martin Jeřábek' will have Windows profile C:\Users\MartinJeřábek).

Solution

  • From my testing, it seems that it is safe to use diacritics that are part of Extended ASCII table (i.e. it is ok to have a user with DisplayName 'Martin Šek' because 'Š' is included, but 'Martin Jeřábek' will cause troubles because 'ř' isn't) 👍
  • To be absolutely sure you don't get into any troubles, avoid using diacritics in the AAD user DisplayName attribute completely 🙂
    • How to replace diacritics? In PowerShell use code [Text.Encoding]::ASCII.GetString([Text.Encoding]::GetEncoding("Cyrillic").GetBytes('Martin Jeřábek'))
0
Subscribe to my newsletter

Read articles from Ondrej Sebela directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Ondrej Sebela
Ondrej Sebela

I work as System Administrator for more than 10 years now and I love to make my life easier by automating work & personal stuff via PowerShell (even silly things like food recipes list generation).