0x00000523 Invalid Account Name Fix That Works
This error means Windows can't parse the name you typed. The fix is almost always in the format or domain context. Here's how to get past it fast.
You're trying to add a user or grant permissions, and Windows throws that 0x00000523 garbage. Yeah, it's annoying. Let's get it sorted.
First Thing — The Real Fix
This error means Windows can't parse whatever you typed as a valid account name. The most likely culprit? You used a UPN (user@domain.com) style name where Windows expects the old-school down-level logon name (DOMAIN\User). Or you used a local name without specifying the machine.
Step 1 — Check the format for local accounts
If this is a local account on the same machine, you need to prefix it with the machine name. Not Administrator — use MACHINENAME\Administrator. Same goes for the built-in SYSTEM account — that's NT AUTHORITY\SYSTEM, not just SYSTEM.
# Wrong — triggers 0x00000523
net user Administrator /active:yes
# Right — use the full context
net localgroup Administrators MACHINENAME\Administrator /add
Step 2 — For domain accounts, use the right syntax
On a domain-joined machine, you have two options. Down-level: DOMAIN\username. UPN: username@domain.com. The key thing: if you're on a domain controller, don't try to use a local account unless it's the built-in Administrator. DCs don't have local SAM databases — they use AD instead.
Step 3 — Check for hidden characters or Unicode issues
I've seen this happen with a trailing space that's invisible in the GUI. Type the name in Notepad, enable show whitespace (Edit > Show All Characters in Notepad++), and check. Also, if you copied the name from an email or web page, you might have picked up a Unicode zero-width space or non-breaking space. These aren't valid in account names.
# Use PowerShell to strip invisible chars
$name = "$([char]0x200B)Administrator" # contains zero-width space
$clean = $name -replace '[\x00-\x08\x0E-\x1F\x7F\x200B-\x200F\x2028-\x202F\xFEFF]', ''
Write-Output "Clean: '$clean'"
Why This Works — The Underlying Cause
What's actually happening here is that Windows security subsystem (LSASS) runs the name through the TranslateName function, which expects a very specific format. There's no fuzzy matching — it's strict parsing. If the name doesn't include the domain or machine context, LSASS doesn't know where to look for it.
The reason step 3 works is that Windows account names are NTFS byte sequences that don't tolerate non-ASCII whitespace. The Unicode category Zs (space separator) includes things like no-break space (U+00A0) and ideographic space (U+3000) that look like normal spaces in most fonts but aren't valid in SID lookups.
Less Common Variations
Sometimes the error pops up in unexpected places:
- During SQL Server setup — SQL setup uses Windows account names for service accounts and can throw 0x00000523 if you type
NT AUTHORITY\NETWORK SERVICEwith a typo. Double-check the name againstservices.msc. - IIS Application Pool identity — You set the pool to run as a specific user, and the name comes back with this error. Usually because you didn't include the domain or machine name prefix.
- Active Directory Users and Computers — Adding a user to a group in ADUC can fail if the target user's name contains a character like
@or#that isn't escaped. Try the distinguished name instead:CN=User Name,OU=Users,DC=domain,DC=com. - Remote Desktop Services — RDS licensing sometimes rejects account names that contain hyphens or apostrophes. Microsoft's RDS parser is stricter than AD's.
| Context | Common Mistake | Correct Format |
|---|---|---|
| Local account (workstation) | Administrator |
MACHINENAME\Administrator |
| Local account (server) | Administrator |
SERVERNAME\Administrator |
| Domain account | user@domain.com (works in some places) |
DOMAIN\username (most reliable) |
| Built-in service accounts | SYSTEM |
NT AUTHORITY\SYSTEM |
Prevention Going Forward
Stop typing names freehand. Use the Check Names button or the Object Types picker in the security dialog. If you're scripting, use the SID instead of the name — SIDs never have formatting issues. You can get a user's SID with wmic useraccount where name='username' get sid or Get-LocalUser -Name 'username' | Select-Object Sid in PowerShell.
If you're working in a mixed environment with both local and domain users, be explicit. Always specify the domain or machine. I'd rather type DESKTOP-ABC123\John than wonder why the error keeps coming back.
Was this solution helpful?