using System.Security.Principal; IPrincipal principal = Thread.CurrentPrincipal; Type type = principal.GetType(); Console.WriteLine(type.FullName);
using System.Security.Claims; ClaimsPrincipal claimsPrincipal = new ClaimsPrincipal(); Type type = claimsPrincipal.GetType(); Console.WriteLine(type.FullName);This code creates a new ClaimsPrincipal instance and calls GetType() to get its type. It then prints the full name of the type. Package library: System.Security.Claims