4 instantiations of WindowsIdentity
Microsoft.AspNetCore.Server.IISIntegration (1)
IISMiddleware.cs (1)
179var winIdentity = new WindowsIdentity(handle, IISDefaults.AuthenticationScheme);
System.Security.Principal.Windows (3)
System\Security\Principal\WindowsIdentity.cs (3)
370return new WindowsIdentity(); 826return new WindowsIdentity(safeTokenHandle); 975return new WindowsIdentity(this);
76 references to WindowsIdentity
aspire (2)
Certificates\CertificateGeneration\WindowsCertificateManager.cs (2)
144var currentUser = WindowsIdentity.GetCurrent();
Aspire.Hosting.RemoteHost (1)
JsonRpcServer.cs (1)
75var currentUser = WindowsIdentity.GetCurrent().User;
csc (4)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (2)
669var currentIdentity = WindowsIdentity.GetCurrent();
src\roslyn\src\Compilers\Shared\NamedPipeUtil.cs (2)
71var currentIdentity = WindowsIdentity.GetCurrent();
dotnet (4)
src\sdk\artifacts\.packages\microsoft.codeanalysis.buildclient\5.8.0-1.26268.104\contentFiles\cs\net11.0\BuildServerConnection.cs (2)
669var currentIdentity = WindowsIdentity.GetCurrent();
src\sdk\artifacts\.packages\microsoft.codeanalysis.buildclient\5.8.0-1.26268.104\contentFiles\cs\net11.0\NamedPipeUtil.cs (2)
71var currentIdentity = WindowsIdentity.GetCurrent();
dotnet-dev-certs (2)
src\aspnetcore\src\Shared\CertificateGeneration\WindowsCertificateManager.cs (2)
143var currentUser = WindowsIdentity.GetCurrent();
Microsoft.AspNetCore.DataProtection (4)
Repositories\RegistryXmlRepository.cs (1)
94WindowsIdentity.GetCurrent()!.User!.Value);
XmlEncryption\DpapiNGXmlEncryptor.cs (2)
104using (var currentIdentity = WindowsIdentity.GetCurrent())
XmlEncryption\DpapiXmlEncryptor.cs (1)
59_logger.EncryptingToWindowsDPAPIForCurrentUserAccount(WindowsIdentity.GetCurrent().Name);
Microsoft.AspNetCore.DeveloperCertificates.XPlat (2)
src\aspnetcore\src\Shared\CertificateGeneration\WindowsCertificateManager.cs (2)
143var currentUser = WindowsIdentity.GetCurrent();
Microsoft.AspNetCore.Http.Connections (4)
Internal\HttpConnectionContext.cs (1)
280if (TransportType == HttpTransportType.LongPolling && User?.Identity is WindowsIdentity)
Internal\HttpConnectionDispatcher.cs (3)
633if (!(context.User.Identity is WindowsIdentity)) 683if (oldContext.User.Identity is WindowsIdentity windowsIdentity) 690newContext.User = new WindowsPrincipal((WindowsIdentity)(windowsIdentity.Clone()));
Microsoft.AspNetCore.Server.IISIntegration (1)
IISMiddleware.cs (1)
179var winIdentity = new WindowsIdentity(handle, IISDefaults.AuthenticationScheme);
Microsoft.AspNetCore.Server.Kestrel.Core (2)
src\aspnetcore\src\Shared\CertificateGeneration\WindowsCertificateManager.cs (2)
143var currentUser = WindowsIdentity.GetCurrent();
Microsoft.Build.Framework (1)
BackEnd\CommunicationsUtilities.cs (1)
641new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator))
Microsoft.Build.Tasks.CodeAnalysis (4)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (2)
669var currentIdentity = WindowsIdentity.GetCurrent();
src\roslyn\src\Compilers\Shared\NamedPipeUtil.cs (2)
71var currentIdentity = WindowsIdentity.GetCurrent();
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
src\roslyn\src\Compilers\Shared\NamedPipeUtil.cs (2)
71var currentIdentity = WindowsIdentity.GetCurrent();
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
src\roslyn\src\Compilers\Shared\NamedPipeUtil.cs (2)
71var currentIdentity = WindowsIdentity.GetCurrent();
Microsoft.DotNet.Cli.Utils (1)
Windows.cs (1)
25new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator);
Microsoft.ML.TensorFlow (2)
TensorflowUtils.cs (2)
294WindowsIdentity currentIdentity = null; 297currentIdentity = WindowsIdentity.GetCurrent();
Microsoft.VisualBasic.Forms (2)
Microsoft\VisualBasic\ApplicationServices\WindowsFormsApplicationBase.vb (2)
156Dim ntIdentity As Principal.WindowsIdentity = Principal.WindowsIdentity.GetCurrent
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (1)
ObjectModel\TestRun.cs (1)
70_runUser = WindowsIdentity.GetCurrent().Name;
mscorlib (1)
src\runtime\src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
1059[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Principal.WindowsIdentity))]
RepoTasks (2)
src\aspnetcore\src\Shared\CertificateGeneration\WindowsCertificateManager.cs (2)
143var currentUser = WindowsIdentity.GetCurrent();
System.Diagnostics.PerformanceCounter (2)
misc\EnvironmentHelpers.cs (2)
43using (WindowsIdentity wi = WindowsIdentity.GetCurrent(TokenAccessLevels.Query))
System.DirectoryServices (2)
System\DirectoryServices\ActiveDirectory\DirectoryContext.cs (2)
601using WindowsIdentity identity = WindowsIdentity.GetCurrent();
System.DirectoryServices.AccountManagement (2)
System\DirectoryServices\AccountManagement\Utils.cs (2)
537using (WindowsIdentity currentIdentity = System.Security.Principal.WindowsIdentity.GetCurrent())
System.Security.Principal.Windows (14)
System\Security\Principal\WindowsIdentity.cs (9)
72protected WindowsIdentity(WindowsIdentity identity) 343public static WindowsIdentity GetCurrent() 350public static WindowsIdentity? GetCurrent(bool ifImpersonating) 357public static WindowsIdentity GetCurrent(TokenAccessLevels desiredAccess) 368public static WindowsIdentity GetAnonymous() 809internal static WindowsIdentity? GetCurrentInternal(TokenAccessLevels desiredAccess, bool threadOnly) 963private static string? GetAuthType(WindowsIdentity identity) 971/// Returns a new instance of <see cref="WindowsIdentity"/> with values copied from this object. 1005/// Gets the claims as <see cref="IEnumerable{Claim}"/>, associated with this <see cref="WindowsIdentity"/>.
System\Security\Principal\WindowsPrincipal.cs (5)
27private readonly WindowsIdentity _identity; 33public WindowsPrincipal(WindowsIdentity ntIdentity) 82if (identity is WindowsIdentity wi) 103if (identity is WindowsIdentity wi) 183private static WindowsPrincipal GetDefaultInstance() => new WindowsPrincipal(WindowsIdentity.GetCurrent());
System.ServiceModel.NetFramingBase (2)
System\ServiceModel\Security\SecurityUtilsEx.cs (2)
180WindowsIdentity windows = identity as WindowsIdentity;
System.ServiceModel.Primitives (2)
System\ServiceModel\Security\SecurityUtils.cs (2)
796using (WindowsIdentity self = WindowsIdentity.GetCurrent())
vbc (4)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (2)
669var currentIdentity = WindowsIdentity.GetCurrent();
src\roslyn\src\Compilers\Shared\NamedPipeUtil.cs (2)
71var currentIdentity = WindowsIdentity.GetCurrent();
VBCSCompiler (4)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (2)
669var currentIdentity = WindowsIdentity.GetCurrent();
src\roslyn\src\Compilers\Shared\NamedPipeUtil.cs (2)
71var currentIdentity = WindowsIdentity.GetCurrent();