Windows – Why can a and o in samAccountName be replaced with danish å and ø

active-directorywindows

A coworker just demonstrated to me that accounts in our test AD was able to authenticate when replacing every a character in their samAccountName with Danish character å (ASCII 134 / å).

E.g. the user <domain>\aaa can authenticate as ååå.

I tried reproducing this in a freshly provisioned W2K12R2 AD (single server, all standard values), and it works there too. I created an account aaa (never touching the letter å in the process, so that nothing contains å) and ran:

PS C:\Users\Administrator> runas /user:ååå notepad
Enter the password for ååå:
Attempting to start notepad as user "DEV-DLI\ååå" ...
PS C:\Users\Administrator>

which caused notepad to start, running as aaa.

The same seems to hold true for o and Danish character ø, while the last Danish special char æ does not seem to correspond to any other character. With user aaa in AD, trying to create a user with samAccountName ååå will fail, informing you that The user logon name you have chosen is already in use (...).

I have googled like a madman, but have been unable to find out what is going on. Does anyone have any hints as to why this works?

Best Answer

This is by design. In short, Active Directory maps the accented/diacritical characters to their "simple" form. Please see the following Microsoft Support article.

Windows logon behavior if your user name contains characters that have accents or other diacritical marks (Dead link) (Live version archived here):

If your user name in the Active Directory directory service contains one or more characters that have accents or other diacritical marks, you may find that you do not have to use the diacritical mark as you type your user name to log on to Windows. You can log on by using the simple form of the character or characters. For example, if your user name in Active Directory is jésush, you can type jesush in the User name box in the Log On to Windows dialog box to log on to Windows.

This behavior occurs so that in situations when you have to log on to Windows from a computer where the preferred keyboard mapping is not installed, you can still log on to Windows by using your user name without the diacritical marks.