| Previous | Next |
| ERROR_NO_SUCH_LOGON_SESSION | ERROR_PRIVILEGE_NOT_HELD |
ERROR_NO_SUCH_PRIVILEGE
A privilege lookup referenced a name that Windows does not recognize
Privileges are named system rights represented in a token by LUID values and attributes. APIs such as LookupPrivilegeValue translate a defined privilege name to its locally used identifier; token privilege adjustment can only operate on privileges known to the system and present in the token. This error is about the identity of the privilege itself, not simply about a caller lacking that privilege.
Log the exact privilege string before changing policy. A typo, use of a display label instead of the API constant name, or assumptions about a privilege that is unavailable on the target Windows version can all produce this state. If the privilege is recognized but missing from the token, the diagnostic outcome is different: AdjustTokenPrivileges can return success while GetLastError reports ERROR_NOT_ALL_ASSIGNED. Query token privileges separately from LSA account-right assignment so the investigation does not conflate policy configuration with token contents.
What to inspect
- Capture the exact privilege name passed to the lookup or security API.
- Compare the privilege LUID and attributes in TokenPrivileges when lookup succeeds.
- Separate an unknown privilege name from a known privilege absent from the caller token.
References
Looking for a different code? Search another status or error code.
