The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
IPrincipal Interface
.NET Framework (current version)
Defines the basic functionality of a principal object.
Assembly: mscorlib (in mscorlib.dll)
| Name | Description | |
|---|---|---|
![]() | Identity | Gets the identity of the current principal. |
| Name | Description | |
|---|---|---|
![]() | IsInRole(String) | Determines whether the current principal belongs to the specified role. |
A principal object represents the security context of the user on whose behalf the code is running, including that user's identity (IIdentity) and any roles to which they belong.
All principal objects are required to implement the IPrincipal interface. For more information about IPrincipal implementations, see the ClaimsPrincipal class.
Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Show:
.jpeg?cs-save-lang=1&cs-lang=csharp)
.jpeg?cs-save-lang=1&cs-lang=csharp)