0XC0000062

Fix STATUS_INVALID_ACCOUNT_NAME (0xC0000062) Fast

This error means Windows can't parse the account name you entered. We'll fix it by checking the format, then move to deeper causes like domain issues.

You're staring at STATUS_INVALID_ACCOUNT_NAME (0xC0000062)

I get it — you entered what you thought was a perfectly valid username, and Windows just shrugged. This error usually pops up during login, application access, or when running a command that authenticates against an account. The message "The name provided is not a properly formed account name" is Microsoft's way of saying the format is wrong, not that the account doesn't exist. Let's fix it without wasting time.

First, Check the Account Name Format

This is the most common cause. Windows expects account names in one of two formats:

  • Down-Level Logon Name: DOMAIN\UserName (backslash, not forward slash). Example: WORKGROUP\John or CONTOSO\jsmith
  • User Principal Name (UPN): user@domain.com (only for domain-joined machines or Microsoft accounts)

If you typed username@local or COMPUTERNAMEusername (missing the backslash), that's your problem. For a local account, use COMPUTERNAME\Username. To find your computer name, run hostname in a command prompt.

Real-world trigger: I see this most often when someone copies a username from an email signature that includes a space or a comma — Windows chokes on those. Also, when using RunAs or net use commands, the separator matters.

If Format Is Correct, Check for Typos and Special Characters

Windows allows most special characters in usernames, but there are hard no-goes: backslash (except as domain separator), forward slash, angle brackets, pipes, and double quotes. If your username contains any of these, you'll get the error. Also, trailing spaces — people miss them all the time. Use echo "%USERNAME%" to see the exact string.

Still Broken? It Might Be a Domain or Trust Issue

If the account is a domain account, the error can appear when the computer can't contact the domain controller or when the trust relationship is broken. This is common after a password change on the machine account or a time sync failure. Try these steps in order:

  1. Verify the domain name is correct — use the NetBIOS name (e.g., CONTOSO) not the DNS name (contoso.com) for the down-level format.
  2. Run nltest /dsgetdc:DOMAIN to see if the machine can find a domain controller. If it fails, you have a network or trust issue.
  3. Reset the machine account password with netdom resetpwd /server:DC /userd:DOMAIN\Admin /passwordd:* from an elevated prompt. This requires admin rights on the domain.
  4. If trust is completely broken, rejoin the domain — remove it, reboot, re-add it.

The Weird Registry Edge Case (Advanced)

On older Windows versions (Windows 7, Server 2008 R2), there's a registry key that can cause this error even with perfect formatting. Look in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa for a value called LimitBlankPasswordUse. If it's set to 1 and you're trying to use a blank password account (local or guest), Windows will reject the name. Set it to 0 to allow blank passwords — but please don't do that unless you understand the security implications. Better to give the account a password.

Less Common Variations

Here are a couple I've seen on my help desk blog comment section:

  • Group Policy Block: A domain GPO can restrict which account name formats are allowed. Check Network access: Allow anonymous SID/Name translation in secpol.msc.
  • Application-Specific: Some older apps (I'm looking at you, SQL Server 2008) expect the UPN format but use it internally wrong. Try the down-level format instead.
  • Kerberos vs NTLM: If your app uses Kerberos, the UPN must match the SPN exactly. Mismatch gives this error. Use setspn -L username to check.

How to Prevent This From Happening Again

Three things:

  1. Standardize account name formats in your organization. Train users to always use DOMAIN\username for network resources.
  2. Audit for special characters in usernames at creation time. No spaces, no backslashes, no quotes. Keep it alphanumeric plus hyphens or underscores.
  3. Monitor domain trust health with a regular nltest /sc_query:DOMAIN script. Catch trust issues before they trigger login errors.

That's it. You should be past the 0xC0000062 error now. If not, check the Event Viewer under Windows Logs > Security — look for event ID 4776 or 4625, which will give you the account name Windows actually tried to use. Sometimes the mismatch is right there in plain text.

Related Errors in Windows Errors
0XC0262328 Fix 0XC0262328: Display adapter needs a video present source 0XC00000AB Named pipe instance limit hit: 0XC00000AB fix 0XC00D1092 Fix NS_E_WMPCORE_WMX_LIST_ATTRIBUTE_NAME_ILLEGAL (0xC00D1092) in WMP 0X00000908 Fix 0X00000908: Session Not Found in Windows Network

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.