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)
874
internal static partial bool OpenThreadToken(nint ThreadHandle, global::System.Security.Principal.
TokenAccessLevels
dwDesiredAccess, bool bOpenAsSelf, out global::Microsoft.Win32.SafeHandles.SafeTokenHandle phThreadToken)
918
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)
582
internal static partial bool OpenThreadToken(nint ThreadHandle, global::System.Security.Principal.
TokenAccessLevels
dwDesiredAccess, bool bOpenAsSelf, out global::Microsoft.Win32.SafeHandles.SafeTokenHandle phThreadToken)
626
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)
337
internal static partial bool OpenThreadToken(nint ThreadHandle, global::System.Security.Principal.
TokenAccessLevels
dwDesiredAccess, bool bOpenAsSelf, out global::Microsoft.Win32.SafeHandles.SafeTokenHandle phThreadToken)
381
static extern unsafe int __PInvoke(nint __ThreadHandle_native, global::System.Security.Principal.
TokenAccessLevels
__dwDesiredAccess_native, int __bOpenAsSelf_native, nint* __phThreadToken_native);
391
internal static partial bool OpenProcessToken(nint ProcessToken, global::System.Security.Principal.
TokenAccessLevels
DesiredAccess, out global::Microsoft.Win32.SafeHandles.SafeTokenHandle TokenHandle)
432
static extern unsafe int __PInvoke(nint __ProcessToken_native, global::System.Security.Principal.
TokenAccessLevels
__DesiredAccess_native, nint* __TokenHandle_native);
552
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)
605
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)
64
static extern unsafe int __PInvoke(nint __ProcessToken_native, global::System.Security.Principal.
TokenAccessLevels
__DesiredAccess_native, nint* __TokenHandle_native);
885
private static partial bool OpenThreadToken(nint ThreadHandle, global::System.Security.Principal.
TokenAccessLevels
dwDesiredAccess, bool bOpenAsSelf, out global::Microsoft.Win32.SafeHandles.SafeAccessTokenHandle phThreadToken)
929
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,