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)
778
internal static partial bool OpenThreadToken(nint ThreadHandle, global::System.Security.Principal.
TokenAccessLevels
dwDesiredAccess, bool bOpenAsSelf, out global::Microsoft.Win32.SafeHandles.SafeTokenHandle phThreadToken)
819
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)
17
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)
522
internal static partial bool OpenThreadToken(nint ThreadHandle, global::System.Security.Principal.
TokenAccessLevels
dwDesiredAccess, bool bOpenAsSelf, out global::Microsoft.Win32.SafeHandles.SafeTokenHandle phThreadToken)
563
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)
17
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)
301
internal static partial bool OpenThreadToken(nint ThreadHandle, global::System.Security.Principal.
TokenAccessLevels
dwDesiredAccess, bool bOpenAsSelf, out global::Microsoft.Win32.SafeHandles.SafeTokenHandle phThreadToken)
342
static extern unsafe int __PInvoke(nint __ThreadHandle_native, global::System.Security.Principal.
TokenAccessLevels
__dwDesiredAccess_native, int __bOpenAsSelf_native, nint* __phThreadToken_native);
351
internal static partial bool OpenProcessToken(nint ProcessToken, global::System.Security.Principal.
TokenAccessLevels
DesiredAccess, out global::Microsoft.Win32.SafeHandles.SafeTokenHandle TokenHandle)
389
static extern unsafe int __PInvoke(nint __ProcessToken_native, global::System.Security.Principal.
TokenAccessLevels
__DesiredAccess_native, nint* __TokenHandle_native);
500
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)
550
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)
17
TokenAccessLevels
DesiredAccess,
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.OpenProcessToken_IntPtr.cs (1)
17
TokenAccessLevels
DesiredAccess,
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.OpenThreadToken_SafeTokenHandle.cs (1)
17
TokenAccessLevels
dwDesiredAccess,
System\Security\AccessControl\Privilege.cs (6)
174
TokenAccessLevels
.Duplicate,
194
TokenAccessLevels
.Query |
TokenAccessLevels
.AdjustPrivileges,
217
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)
61
static extern unsafe int __PInvoke(nint __ProcessToken_native, global::System.Security.Principal.
TokenAccessLevels
__DesiredAccess_native, nint* __TokenHandle_native);
805
private static partial bool OpenThreadToken(nint ThreadHandle, global::System.Security.Principal.
TokenAccessLevels
dwDesiredAccess, bool bOpenAsSelf, out global::Microsoft.Win32.SafeHandles.SafeAccessTokenHandle phThreadToken)
846
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)
17
TokenAccessLevels
DesiredAccess,
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.OpenThreadToken_SafeAccessTokenHandle.cs (2)
17
TokenAccessLevels
dwDesiredAccess,
21
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,