4

Is it possible to change the local username (C:\Users\xxx) on a AAD joined Windows 10 computer?

Long version:

Setup & Info: Windows 10 Business, Azure AD joined computer. Cloud only with "Microsoft 365". Intune MDM.

When a tenant user are logged into a computer the local username becomes "FirstnameMiddlenameLastname". So you get: "C:\Users\FirstnameMiddlenameLastname\" as path for the user.

In Azure AD the user names (UPN) are configured to "firstname.lastname@domain". So the UPN are not used for generating local usernames on the computer.

The "FirstnameMiddlenameLastname" actually seems to correspond to the field "DisplayName" or "Name*" in Azure AD. But Windows 10 removes space and other illegal characters for Windows.

Question:

Is it possible to change the resulting local Windows 10 user name?

or in other words: change the source for local username generation on windows 10 clients.

On traditional "on premise" setups the username are more sensible names and shorter defined by the Admin, UPN. However now Windows don't use the actual UPN as username anymore....

With the "FirstnameMiddlenameLastname" we have the following problems:

  1. Legacy programs have problem with the resulting path, as many "FirstnameMiddlenameLastname" contain illegal characters in our region / country.
  2. The usernames becomes very long for many users and we would rather go with initials on several parts of the username.
  3. Admin control over usernames becomes totally unpredictable as the system selects what characters, when to stop (max length) and so on.
Klaus
  • 41
  • 1
  • 2
  • Sounds like this is more about the local folder name rather than a local username? – roaima May 06 '18 at 22:39
  • Unfortunately not. If I run "whoamai" in cmd I get "azuread\FirstnameMiddlenameLastname", if I then run "whoami /UPN" we get "firstname.lastname@domain" – Klaus May 08 '18 at 19:27
  • Would love to know the answer to this as well. Some legacy apps use this %username% to pre-populate login and the length is unworkable. – Adam Nov 20 '18 at 23:28
  • 1
    My useraccounts are fucked due to this, i always get userfolder name "PoulKjeldagerSørensen", try to be a dev with that Ø in the username. Azure Function / Visual studio do not work with it. And its a hassle to change it after. Would be nice to tell ad which folder name to use. – Poul K. Sørensen Apr 19 '20 at 19:21
  • Unfortunately not. The one thing that you can have an affect on is the home folder, which you noted relates to the 'DisplayName' attribute in Azure AD. This sucks, but if you are willing to sacrifice the Display Nam, you can put the value desired for your home folder into that field. This will at least help anyone who has certain unicode characters in their names, like @Poul. – SamErde Aug 08 '22 at 06:26

0 Answers0