4.7.0
3 Dec 19
Toggle Dropdown
Version 5
5.0.0
9 Nov 20
5.0.0-rc.2.20475.5
13 Oct 20
5.0.0-rc.1.20451.14
14 Sep 20
5.0.0-preview.8.20407.11
25 Aug 20
5.0.0-preview.7.20364.11
21 Jul 20
5.0.0-preview.6.20305.6
25 Jun 20
5.0.0-preview.5.20278.1
10 Jun 20
5.0.0-preview.4.20251.6
18 May 20
5.0.0-preview.3.20214.6
23 Apr 20
5.0.0-preview.2.20160.6
2 Apr 20
5.0.0-preview.1.20120.5
16 Mar 20
Version 4
4.7.0
3 Dec 19
4.7.0-preview3.19551.4
13 Nov 19
4.7.0-preview2.19523.17
1 Nov 19
4.7.0-preview1.19504.10
15 Oct 19
4.6.0
23 Sep 19
4.6.0-rc1.19456.4
16 Sep 19
4.6.0-preview9.19421.4
4 Sep 19
4.6.0-preview9.19416.11
4 Sep 19
4.6.0-preview8.19405.3
13 Aug 19
4.6.0-preview7.19362.9
23 Jul 19
4.6.0-preview6.19303.8
12 Jun 19
4.6.0-preview6.19264.9
4 Sep 19
4.6.0-preview5.19224.8
6 May 19
4.6.0-preview4.19212.13
18 Apr 19
4.6.0-preview3.19128.7
6 Mar 19
4.6.0-preview.19073.11
29 Jan 19
4.6.0-preview.18571.3
3 Dec 18
4.5.1
1 Oct 18
4.5.0
29 May 18
4.5.0-rc1
6 May 18
4.5.0-preview2-26406-04
10 Apr 18
4.5.0-preview1-26216-02
26 Feb 18
4.5.0-preview1-25914-04
15 Nov 17
4.4.1
12 Dec 17
4.4.0
11 Aug 17
4.4.0-preview2-25405-01
27 Jun 17
4.4.0-preview1-25305-02
9 May 17
4.3.0
15 Nov 16
4.3.0-preview1-24530-04
24 Oct 16
4.0.0
27 Jun 16
4.0.0-rc2-24027
16 May 16
4.0.0-beta-23516
18 Nov 15
4.0.0-beta-23409
15 Oct 15
4.0.0-beta-23225
2 Sep 15
4.0.0-beta-23123
29 Jul 15
4.0.0-beta-23109
27 Jul 15
4.0.0-beta-23019
30 Jun 15
4.0.0-beta-22816
24 Apr 15
4.0.0-beta-22605
13 Feb 15
4.0.0-beta-22416
16 Jan 15
4.0.0-beta-22231
11 Nov 14
Compare to version...
with 4.0.0
Toggle Dropdown
Version 5
5.0.0
9 Nov 20
5.0.0-rc.2.20475.5
13 Oct 20
5.0.0-rc.1.20451.14
14 Sep 20
5.0.0-preview.8.20407.11
25 Aug 20
5.0.0-preview.7.20364.11
21 Jul 20
5.0.0-preview.6.20305.6
25 Jun 20
5.0.0-preview.5.20278.1
10 Jun 20
5.0.0-preview.4.20251.6
18 May 20
5.0.0-preview.3.20214.6
23 Apr 20
5.0.0-preview.2.20160.6
2 Apr 20
5.0.0-preview.1.20120.5
16 Mar 20
Version 4
4.7.0
3 Dec 19
4.7.0-preview3.19551.4
13 Nov 19
4.7.0-preview2.19523.17
1 Nov 19
4.7.0-preview1.19504.10
15 Oct 19
4.6.0
23 Sep 19
4.6.0-rc1.19456.4
16 Sep 19
4.6.0-preview9.19421.4
4 Sep 19
4.6.0-preview9.19416.11
4 Sep 19
4.6.0-preview8.19405.3
13 Aug 19
4.6.0-preview7.19362.9
23 Jul 19
4.6.0-preview6.19303.8
12 Jun 19
4.6.0-preview6.19264.9
4 Sep 19
4.6.0-preview5.19224.8
6 May 19
4.6.0-preview4.19212.13
18 Apr 19
4.6.0-preview3.19128.7
6 Mar 19
4.6.0-preview.19073.11
29 Jan 19
4.6.0-preview.18571.3
3 Dec 18
4.5.1
1 Oct 18
4.5.0
29 May 18
4.5.0-rc1
6 May 18
4.5.0-preview2-26406-04
10 Apr 18
4.5.0-preview1-26216-02
26 Feb 18
4.5.0-preview1-25914-04
15 Nov 17
4.4.1
12 Dec 17
4.4.0
11 Aug 17
4.4.0-preview2-25405-01
27 Jun 17
4.4.0-preview1-25305-02
9 May 17
4.3.0
15 Nov 16
4.3.0-preview1-24530-04
24 Oct 16
4.0.0
27 Jun 16
4.0.0-rc2-24027
16 May 16
4.0.0-beta-23516
18 Nov 15
4.0.0-beta-23409
15 Oct 15
4.0.0-beta-23225
2 Sep 15
4.0.0-beta-23123
29 Jul 15
4.0.0-beta-23109
27 Jul 15
4.0.0-beta-23019
30 Jun 15
4.0.0-beta-22816
24 Apr 15
4.0.0-beta-22605
13 Feb 15
4.0.0-beta-22416
16 Jan 15
4.0.0-beta-22231
11 Nov 14
Download Package
Open in NuGet
<
PackageReference
Include
=
"System.Security.Principal.Windows"
Version
=
"4.7.0"
/>
API Differences between 4.7.0 and 4.0.0
213
Additions
0
Removals
Microsoft.Win32.SafeHandles
public
sealed
class
SafeAccessTokenHandle
:
SafeHandle
public
static
SafeAccessTokenHandle
InvalidHandle
{
get
; }
public
SafeAccessTokenHandle
(
IntPtr
handle
)
System.Security.Principal
public
sealed
class
IdentityNotMappedException
:
SystemException
public
IdentityReferenceCollection
UnmappedIdentities
{
get
; }
public
IdentityNotMappedException
()
public
IdentityNotMappedException
(
string
message
)
public
IdentityNotMappedException
(
string
message
,
Exception
inner
)
public
abstract
class
IdentityReference
public
abstract
string
Value
{
get
; }
public
static
bool
op_Equality
(
IdentityReference
left
,
IdentityReference
right
)
public
static
bool
op_Inequality
(
IdentityReference
left
,
IdentityReference
right
)
public
abstract
bool
Equals
(
object
o
)
public
abstract
int
GetHashCode
()
public
abstract
bool
IsValidTargetType
(
Type
targetType
)
public
abstract
string
ToString
()
public
abstract
IdentityReference
Translate
(
Type
targetType
)
public
class
IdentityReferenceCollection
:
ICollection
<
IdentityReference
>,
IEnumerable
<
IdentityReference
>,
IEnumerable
public
int
Count
{
get
; }
public
IdentityReference
this
[
int
index
] {
get
;
set
; }
public
IdentityReferenceCollection
()
public
IdentityReferenceCollection
(
int
capacity
)
public
void
Add
(
IdentityReference
identity
)
public
void
Clear
()
public
bool
Contains
(
IdentityReference
identity
)
public
void
CopyTo
(
IdentityReference
[]
array
,
int
offset
)
public
IEnumerator
<
IdentityReference
>
GetEnumerator
()
public
bool
Remove
(
IdentityReference
identity
)
public
IdentityReferenceCollection
Translate
(
Type
targetType
)
public
IdentityReferenceCollection
Translate
(
Type
targetType
,
bool
forceSuccess
)
public
sealed
class
NTAccount
:
IdentityReference
public
NTAccount
(
string
name
)
public
NTAccount
(
string
domainName
,
string
accountName
)
public
static
bool
op_Equality
(
NTAccount
left
,
NTAccount
right
)
public
static
bool
op_Inequality
(
NTAccount
left
,
NTAccount
right
)
public
sealed
class
SecurityIdentifier
:
IdentityReference
,
IComparable
<
SecurityIdentifier
>
public
static
readonly
int
MaxBinaryLength
public
static
readonly
int
MinBinaryLength
public
SecurityIdentifier
AccountDomainSid
{
get
; }
public
int
BinaryLength
{
get
; }
public
SecurityIdentifier
(
byte
[]
binaryForm
,
int
offset
)
public
SecurityIdentifier
(
IntPtr
binaryForm
)
public
SecurityIdentifier
(
WellKnownSidType
sidType
,
SecurityIdentifier
domainSid
)
public
SecurityIdentifier
(
string
sddlForm
)
public
static
bool
op_Equality
(
SecurityIdentifier
left
,
SecurityIdentifier
right
)
public
static
bool
op_Inequality
(
SecurityIdentifier
left
,
SecurityIdentifier
right
)
public
int
CompareTo
(
SecurityIdentifier
sid
)
public
bool
Equals
(
SecurityIdentifier
sid
)
public
void
GetBinaryForm
(
byte
[]
binaryForm
,
int
offset
)
public
bool
IsAccountSid
()
public
bool
IsEqualDomainSid
(
SecurityIdentifier
sid
)
public
bool
IsWellKnown
(
WellKnownSidType
type
)
public
enum
TokenAccessLevels
AdjustDefault
=
128
AdjustGroups
=
64
AdjustPrivileges
=
32
AdjustSessionId
=
256
AllAccess
=
983551
AssignPrimary
=
1
Duplicate
=
2
Impersonate
=
4
MaximumAllowed
=
33554432
Query
=
8
QuerySource
=
16
Read
=
131080
Write
=
131296
public
enum
WellKnownSidType
AccountAdministratorSid
=
38
AccountCertAdminsSid
=
46
AccountComputersSid
=
44
AccountControllersSid
=
45
AccountDomainAdminsSid
=
41
AccountDomainGuestsSid
=
43
AccountDomainUsersSid
=
42
AccountEnterpriseAdminsSid
=
48
AccountGuestSid
=
39
AccountKrbtgtSid
=
40
AccountPolicyAdminsSid
=
49
AccountRasAndIasServersSid
=
50
AccountSchemaAdminsSid
=
47
AnonymousSid
=
13
AuthenticatedUserSid
=
17
BatchSid
=
10
BuiltinAccountOperatorsSid
=
30
BuiltinAdministratorsSid
=
26
BuiltinAuthorizationAccessSid
=
59
BuiltinBackupOperatorsSid
=
33
BuiltinDomainSid
=
25
BuiltinGuestsSid
=
28
BuiltinIncomingForestTrustBuildersSid
=
56
BuiltinNetworkConfigurationOperatorsSid
=
37
BuiltinPerformanceLoggingUsersSid
=
58
BuiltinPerformanceMonitoringUsersSid
=
57
BuiltinPowerUsersSid
=
29
BuiltinPreWindows2000CompatibleAccessSid
=
35
BuiltinPrintOperatorsSid
=
32
BuiltinRemoteDesktopUsersSid
=
36
BuiltinReplicatorSid
=
34
BuiltinSystemOperatorsSid
=
31
BuiltinUsersSid
=
27
CreatorGroupServerSid
=
6
CreatorGroupSid
=
4
CreatorOwnerServerSid
=
5
CreatorOwnerSid
=
3
DialupSid
=
8
DigestAuthenticationSid
=
52
EnterpriseControllersSid
=
15
InteractiveSid
=
11
LocalServiceSid
=
23
LocalSid
=
2
LocalSystemSid
=
22
LogonIdsSid
=
21
MaxDefined
=
60
NetworkServiceSid
=
24
NetworkSid
=
9
NTAuthoritySid
=
7
NtlmAuthenticationSid
=
51
NullSid
=
0
OtherOrganizationSid
=
55
ProxySid
=
14
RemoteLogonIdSid
=
20
RestrictedCodeSid
=
18
SChannelAuthenticationSid
=
53
SelfSid
=
16
ServiceSid
=
12
TerminalServerSid
=
19
ThisOrganizationSid
=
54
WinAccountReadonlyControllersSid
=
75
WinApplicationPackageAuthoritySid
=
83
WinBuiltinAnyPackageSid
=
84
WinBuiltinCertSvcDComAccessGroup
=
78
WinBuiltinCryptoOperatorsSid
=
64
WinBuiltinDCOMUsersSid
=
61
WinBuiltinEventLogReadersGroup
=
76
WinBuiltinIUsersSid
=
62
WinBuiltinTerminalServerLicenseServersSid
=
60
WinCacheablePrincipalsGroupSid
=
72
WinCapabilityDocumentsLibrarySid
=
91
WinCapabilityEnterpriseAuthenticationSid
=
93
WinCapabilityInternetClientServerSid
=
86
WinCapabilityInternetClientSid
=
85
WinCapabilityMusicLibrarySid
=
90
WinCapabilityPicturesLibrarySid
=
88
WinCapabilityPrivateNetworkClientServerSid
=
87
WinCapabilityRemovableStorageSid
=
94
WinCapabilitySharedUserCertificatesSid
=
92
WinCapabilityVideosLibrarySid
=
89
WinConsoleLogonSid
=
81
WinCreatorOwnerRightsSid
=
71
WinEnterpriseReadonlyControllersSid
=
74
WinHighLabelSid
=
68
WinIUserSid
=
63
WinLocalLogonSid
=
80
WinLowLabelSid
=
66
WinMediumLabelSid
=
67
WinMediumPlusLabelSid
=
79
WinNewEnterpriseReadonlyControllersSid
=
77
WinNonCacheablePrincipalsGroupSid
=
73
WinSystemLabelSid
=
69
WinThisOrganizationCertificateSid
=
82
WinUntrustedLabelSid
=
65
WinWriteRestrictedCodeSid
=
70
WorldSid
=
1
public
enum
WindowsAccountType
Anonymous
=
3
Guest
=
1
Normal
=
0
System
=
2
public
enum
WindowsBuiltInRole
AccountOperator
=
548
Administrator
=
544
BackupOperator
=
551
Guest
=
546
PowerUser
=
547
PrintOperator
=
550
Replicator
=
552
SystemOperator
=
549
User
=
545
public
class
WindowsIdentity
:
ClaimsIdentity
,
IDisposable
,
IDeserializationCallback
,
ISerializable
public
const
string
DefaultIssuer
=
"AD AUTHORITY"
public
SafeAccessTokenHandle
AccessToken
{
get
; }
public
virtual
IEnumerable
<
Claim
>
DeviceClaims
{
get
; }
public
IdentityReferenceCollection
Groups
{
get
; }
public
TokenImpersonationLevel
ImpersonationLevel
{
get
; }
public
virtual
bool
IsAnonymous
{
get
; }
public
virtual
bool
IsGuest
{
get
; }
public
virtual
bool
IsSystem
{
get
; }
public
SecurityIdentifier
Owner
{
get
; }
public
virtual
IntPtr
Token
{
get
; }
public
SecurityIdentifier
User
{
get
; }
public
virtual
IEnumerable
<
Claim
>
UserClaims
{
get
; }
public
WindowsIdentity
(
IntPtr
userToken
)
public
WindowsIdentity
(
IntPtr
userToken
,
string
type
)
public
WindowsIdentity
(
IntPtr
userToken
,
string
type
,
WindowsAccountType
acctType
)
public
WindowsIdentity
(
IntPtr
userToken
,
string
type
,
WindowsAccountType
acctType
,
bool
isAuthenticated
)
public
WindowsIdentity
(
SerializationInfo
info
,
StreamingContext
context
)
protected
WindowsIdentity
(
WindowsIdentity
identity
)
public
WindowsIdentity
(
string
sUserPrincipalName
)
public
static
WindowsIdentity
GetAnonymous
()
public
static
WindowsIdentity
GetCurrent
()
public
static
WindowsIdentity
GetCurrent
(
bool
ifImpersonating
)
public
static
WindowsIdentity
GetCurrent
(
TokenAccessLevels
desiredAccess
)
public
static
void
RunImpersonated
(
SafeAccessTokenHandle
safeAccessTokenHandle
,
Action
action
)
public
static
T
RunImpersonated
<
T
>(
SafeAccessTokenHandle
safeAccessTokenHandle
,
Func
<
T
>
func
)
public
void
Dispose
()
protected
virtual
void
Dispose
(
bool
disposing
)
public
class
WindowsPrincipal
:
ClaimsPrincipal
public
virtual
IEnumerable
<
Claim
>
DeviceClaims
{
get
; }
public
virtual
IEnumerable
<
Claim
>
UserClaims
{
get
; }
public
WindowsPrincipal
(
WindowsIdentity
ntIdentity
)
public
virtual
bool
IsInRole
(
int
rid
)
public
virtual
bool
IsInRole
(
SecurityIdentifier
sid
)
public
virtual
bool
IsInRole
(
WindowsBuiltInRole
role
)