<PackageReference Include="System.Security.Principal.Windows" Version="5.0.0-preview.4.20251.6" />

TokenAccessLevels

public enum TokenAccessLevels
Defines the privileges of the user account associated with the access token.

The user can change the default owner, primary group, or discretionary access control list (DACL) of the token.

The user can change the attributes of the groups in the token.

The user can enable or disable privileges in the token.

The user can adjust the session identifier of the token.

AllAccess = 983551

The user has all possible access to the token.

The user can attach a primary token to a process.

The user can duplicate the token.

The user can impersonate a client.

MaximumAllowed = 33554432

The maximum value that can be assigned for the TokenAccessLevels enumeration.

Query = 8

The user can query the token.

The user can query the source of the token.

Read = 131080

The user has standard read rights and the Query privilege for the token.

Write = 131296

The user has standard write rights and the AdjustPrivileges, AdjustGroups and AdjustDefault privileges for the token.