> For the complete documentation index, see [llms.txt](https://www.pinvoke.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.pinvoke.dev/advapi32/gettokeninformation.md).

# GetTokenInformation

```csharp
[DllImport("ADVAPI32.dll", ExactSpelling = true, SetLastError = true)]
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
public static extern unsafe BOOL GetTokenInformation(
    HANDLE TokenHandle,
    TOKEN_INFORMATION_CLASS TokenInformationClass,
    [Optional] void* TokenInformation,
    uint TokenInformationLength,
    uint* ReturnLength);
```

[TOKEN\_INFORMATION\_CLASS](/security/token_information_class.md)
