I'm wondering where the windows username is pulled from when setting up a new Windows 11 user profile linked to a Microsoft account. For example, if I have an account [email protected], what determines what my local Windows username will be?

For example, what info is pulled to use as the name for my C:\Users\ username\ folder? (I would assume this would also be my sAMAccountName user attribute, or whatever the Home Edition version of that attribute may be called.)

I'm asking because somehow it has chosen something that I didn't know was a piece of information stored anywhere in that [email protected] account.

1 Answer 1


When you start Windows for the first time, the Out of Box Experience (OOBE) asks you who is going to use this computer. This is used to set up the first user account on the PC.

If you type a Microsoft account address at this point, the first 5 characters of your email address are used as the name of the user folder.

If you create a local account instead, whatever you type as the user name is also the name of the user folder.

  • This behavior can be avoided. Create a linked account, once in the account choose the option to switch to a local account, you will be prompt for a username. Once selected the name of the user profile will be that, you can then switch back to linking a Microsoft Account.
    – Ramhound
    May 26, 2023 at 17:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .