What does Windows error code 1315 (ERROR_INVALID_ACCOUNT_NAME) mean?

 
Previous Next
ERROR_PRIVILEGE_NOT_HELD ERROR_USER_EXISTS

ERROR_INVALID_ACCOUNT_NAME

The account name failed validation before a SAM object could be used

SAM account operations address a specific account authority and object type. NetUserAdd and the SAMR create and lookup methods validate the supplied name in that authority before returning or creating a user object. This status is therefore different from ERROR_NO_SUCH_USER: the server is rejecting the name as an account name rather than reporting a valid lookup key with no matching user.

Record the exact Unicode string passed to the API, the server or domain targeted, and whether a command-line tool transformed the name before calling NetAPI. Do not silently strip characters or truncate the input and retry, because that can select or create a different principal. Validate the name at the same API boundary used by the application and distinguish the account name from a display name, UPN, or qualified DOMAIN\name form.

What to inspect

  • Capture the exact name after configuration parsing and before the account API call.
  • Verify which local SAM or domain authority the client opened.
  • Compare the failure with a direct lookup; a missing valid account should produce a different condition.

References


Looking for a different code? Search another status or error code.