44 references to TokenAccessLevels
mscorlib (1)
src\runtime\src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
1054
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Principal.
TokenAccessLevels
))]
System.Diagnostics.PerformanceCounter (1)
misc\EnvironmentHelpers.cs (1)
43
using (WindowsIdentity wi = WindowsIdentity.GetCurrent(
TokenAccessLevels
.Query))
System.DirectoryServices (5)
_generated\0\LibraryImports.g.cs (2)
802
internal static partial bool OpenThreadToken(nint ThreadHandle, global::System.Security.Principal.
TokenAccessLevels
dwDesiredAccess, bool bOpenAsSelf, out global::Microsoft.Win32.SafeHandles.SafeTokenHandle phThreadToken)
844
static extern unsafe int __PInvoke(nint __ThreadHandle_native, global::System.Security.Principal.
TokenAccessLevels
__dwDesiredAccess_native, int __bOpenAsSelf_native, nint* __phThreadToken_native);
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.OpenThreadToken_SafeTokenHandle.cs (1)
18
TokenAccessLevels
dwDesiredAccess,
System\DirectoryServices\ActiveDirectory\Utils.cs (2)
2044
TokenAccessLevels
.Query, // TOKEN_QUERY
2057
(int)
TokenAccessLevels
.Query,
System.DirectoryServices.AccountManagement (5)
_generated\0\LibraryImports.g.cs (2)
537
internal static partial bool OpenThreadToken(nint ThreadHandle, global::System.Security.Principal.
TokenAccessLevels
dwDesiredAccess, bool bOpenAsSelf, out global::Microsoft.Win32.SafeHandles.SafeTokenHandle phThreadToken)
579
static extern unsafe int __PInvoke(nint __ThreadHandle_native, global::System.Security.Principal.
TokenAccessLevels
__dwDesiredAccess_native, int __bOpenAsSelf_native, nint* __phThreadToken_native);
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.OpenThreadToken_SafeTokenHandle.cs (1)
18
TokenAccessLevels
dwDesiredAccess,
System\DirectoryServices\AccountManagement\Utils.cs (2)
356
TokenAccessLevels
.Query,
369
(int)
TokenAccessLevels
.Query,
System.Security.AccessControl (16)
_generated\0\LibraryImports.g.cs (6)
310
internal static partial bool OpenThreadToken(nint ThreadHandle, global::System.Security.Principal.
TokenAccessLevels
dwDesiredAccess, bool bOpenAsSelf, out global::Microsoft.Win32.SafeHandles.SafeTokenHandle phThreadToken)
352
static extern unsafe int __PInvoke(nint __ThreadHandle_native, global::System.Security.Principal.
TokenAccessLevels
__dwDesiredAccess_native, int __bOpenAsSelf_native, nint* __phThreadToken_native);
361
internal static partial bool OpenProcessToken(nint ProcessToken, global::System.Security.Principal.
TokenAccessLevels
DesiredAccess, out global::Microsoft.Win32.SafeHandles.SafeTokenHandle TokenHandle)
400
static extern unsafe int __PInvoke(nint __ProcessToken_native, global::System.Security.Principal.
TokenAccessLevels
__DesiredAccess_native, nint* __TokenHandle_native);
513
internal static partial bool DuplicateTokenEx(global::Microsoft.Win32.SafeHandles.SafeTokenHandle ExistingTokenHandle, global::System.Security.Principal.
TokenAccessLevels
DesiredAccess, nint TokenAttributes, global::Interop.Advapi32.SECURITY_IMPERSONATION_LEVEL ImpersonationLevel, global::System.Security.Principal.TokenType TokenType, ref global::Microsoft.Win32.SafeHandles.SafeTokenHandle DuplicateTokenHandle)
564
static extern unsafe int __PInvoke(nint __ExistingTokenHandle_native, global::System.Security.Principal.
TokenAccessLevels
__DesiredAccess_native, nint __TokenAttributes_native, global::Interop.Advapi32.SECURITY_IMPERSONATION_LEVEL __ImpersonationLevel_native, global::System.Security.Principal.TokenType __TokenType_native, nint* __DuplicateTokenHandle_native);
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.DuplicateTokenEx_SafeTokenHandle.cs (1)
18
TokenAccessLevels
DesiredAccess,
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.OpenProcessToken_IntPtr.cs (1)
18
TokenAccessLevels
DesiredAccess,
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.OpenThreadToken_SafeTokenHandle.cs (1)
18
TokenAccessLevels
dwDesiredAccess,
System\Security\AccessControl\Privilege.cs (6)
166
TokenAccessLevels
.Duplicate,
183
TokenAccessLevels
.Query |
TokenAccessLevels
.AdjustPrivileges,
206
TokenAccessLevels
.Impersonate |
TokenAccessLevels
.Query |
TokenAccessLevels
.AdjustPrivileges,
System\Security\Principal\Win32.cs (1)
18
internal static int OpenThreadToken(
TokenAccessLevels
dwDesiredAccess, WinSecurityContext dwOpenAs, out SafeTokenHandle? phThreadToken)
System.Security.Principal.Windows (16)
_generated\0\LibraryImports.g.cs (4)
23
internal static partial bool OpenProcessToken(nint ProcessToken, global::System.Security.Principal.
TokenAccessLevels
DesiredAccess, out global::Microsoft.Win32.SafeHandles.SafeAccessTokenHandle TokenHandle)
62
static extern unsafe int __PInvoke(nint __ProcessToken_native, global::System.Security.Principal.
TokenAccessLevels
__DesiredAccess_native, nint* __TokenHandle_native);
825
private static partial bool OpenThreadToken(nint ThreadHandle, global::System.Security.Principal.
TokenAccessLevels
dwDesiredAccess, bool bOpenAsSelf, out global::Microsoft.Win32.SafeHandles.SafeAccessTokenHandle phThreadToken)
867
static extern unsafe int __PInvoke(nint __ThreadHandle_native, global::System.Security.Principal.
TokenAccessLevels
__dwDesiredAccess_native, int __bOpenAsSelf_native, nint* __phThreadToken_native);
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.OpenProcessToken_SafeAccessTokenHandle.cs (1)
18
TokenAccessLevels
DesiredAccess,
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.OpenThreadToken_SafeAccessTokenHandle.cs (2)
18
TokenAccessLevels
dwDesiredAccess,
22
internal static bool OpenThreadToken(
TokenAccessLevels
desiredAccess, WinSecurityContext openAs, out SafeAccessTokenHandle tokenHandle)
System\Security\Principal\WindowsIdentity.cs (8)
346
return GetCurrentInternal(
TokenAccessLevels
.MaximumAllowed, threadOnly: false)!;
353
return GetCurrentInternal(
TokenAccessLevels
.MaximumAllowed, ifImpersonating);
357
public static WindowsIdentity GetCurrent(
TokenAccessLevels
desiredAccess)
485
(uint)
TokenAccessLevels
.Query,
755
SafeAccessTokenHandle previousToken = GetCurrentToken(
TokenAccessLevels
.MaximumAllowed, false, out bool isImpersonating, out int hr);
809
internal static WindowsIdentity? GetCurrentInternal(
TokenAccessLevels
desiredAccess, bool threadOnly)
852
private static SafeAccessTokenHandle GetCurrentToken(
TokenAccessLevels
desiredAccess, bool threadOnly, out bool isImpersonating, out int hr)
875
private static SafeAccessTokenHandle GetCurrentProcessToken(
TokenAccessLevels
desiredAccess, out int hr)
System\Security\Principal\WindowsPrincipal.cs (1)
154
(uint)
TokenAccessLevels
.Query,