TestimoX

API Reference

Class

GroupMembershipResolver

Namespace ADPlayground
Assembly ADPlayground
Implements
IDisposable

Resolves Active Directory group memberships.

Inheritance

  • Object
  • GroupMembershipResolver

Constructors

public GroupMembershipResolver(String domainController = null, NetworkCredential credential = null, Nullable<TimeSpan> timeout = null, Int32 maxDepth = 256, Int32 maxCacheSize = 10000, Nullable<Int32> maxBatchSize = null) #

Initializes a new instance of the resolver.

Parameters

domainController System.String = null optionalposition: 0
Optional domain controller to query.
credential System.Net.NetworkCredential = null optionalposition: 1
Optional credentials used for binding.
timeout System.Nullable{System.TimeSpan} = null optionalposition: 2
Optional LDAP connection timeout. Defaults to 30 seconds.
maxDepth System.Int32 = 256 optionalposition: 3
Maximum recursion depth. Defaults to 256.
maxCacheSize System.Int32 = 10000 optionalposition: 4
Maximum cache size. Defaults to 10000 entries.
maxBatchSize System.Nullable{System.Int32} = null optionalposition: 5
Maximum number of members processed concurrently. Defaults to 10.

Methods

public static Void ClearCache() #
Returns: Void

Clears the shared cache used by static helpers.

public static Void ClearForestRootCache() #
Returns: Void

Clears cached forest root mappings.

public virtual Void Dispose() #
Returns: Void

Disposes pooled LDAP connections.

EnumerateMembersAsync 5 overloads
public static IAsyncEnumerable<GroupMembershipEntry> EnumerateMembersAsync(IEnumerable<String> groupIdentities, String domainController = null, NetworkCredential credential = null, Nullable<TimeSpan> timeout = null, Int32 maxDepth = 256, Int32 maxCacheSize = 10000, CancellationToken ct = null) #
Returns: IAsyncEnumerable<GroupMembershipEntry>

Enumerates members for a single group using a shared cache.

Parameters

groupIdentity System.String requiredposition: 0
Group identity in DN, SID, UPN or SAM format.
domainController System.String = null optionalposition: 1
Optional domain controller to query.
credential System.Net.NetworkCredential = null optionalposition: 2
Optional credentials used for binding.
timeout System.Nullable{System.TimeSpan} = null optionalposition: 3
Optional LDAP connection timeout. Defaults to 30 seconds.
maxDepth System.Int32 = 256 optionalposition: 4
Maximum recursion depth. Defaults to 256.
maxCacheSize System.Int32 = 10000 optionalposition: 5
Maximum cache size. Defaults to 10000 entries.
ct System.Threading.CancellationToken = null optionalposition: 6
A cancellation token.
EnumerateMembersAsync(System.Collections.Generic.IEnumerable{System.String} groupIdentities, System.String domainController, System.Net.NetworkCredential credential, System.Nullable{System.TimeSpan} timeout, System.Int32 maxDepth, System.Int32 maxCacheSize, System.Threading.CancellationToken ct) #

Enumerates members for multiple groups using a shared cache.

Parameters

groupIdentities System.Collections.Generic.IEnumerable{System.String} required
Group identities in DN, SID, UPN or SAM format.
domainController System.String required
Optional domain controller to query.
credential System.Net.NetworkCredential required
Optional credentials used for binding.
timeout System.Nullable{System.TimeSpan} required
Optional LDAP connection timeout. Defaults to 30 seconds.
maxDepth System.Int32 required
Maximum recursion depth. Defaults to 256.
maxCacheSize System.Int32 required
Maximum cache size. Defaults to 10000 entries.
ct System.Threading.CancellationToken required
A cancellation token.
public IAsyncEnumerable<GroupMembershipEntry> EnumerateMembersAsync(IEnumerable<String> groupIdentities, CancellationToken ct) #
Returns: IAsyncEnumerable<GroupMembershipEntry>

Enumerates members of the specified group.

Parameters

groupIdentity System.String requiredposition: 0
Group identity in DN, SID, UPN or SAM format.
ct System.Threading.CancellationToken requiredposition: 1
A cancellation token.
EnumerateMembersAsync(System.String[] groupIdentities, System.Threading.CancellationToken ct) #

Enumerates members of the specified groups.

Parameters

groupIdentities System.String[] required
Group identities in DN, SID, UPN or SAM format.
ct System.Threading.CancellationToken required
A cancellation token.
EnumerateMembersAsync(System.Collections.Generic.IEnumerable{System.String} groupIdentities, System.Threading.CancellationToken ct) #

Enumerates members of the specified groups.

Parameters

groupIdentities System.Collections.Generic.IEnumerable{System.String} required
Group identities in DN, SID, UPN or SAM format.
ct System.Threading.CancellationToken required
A cancellation token.
ResolveMembers 6 overloads
public static GroupMembershipResult ResolveMembers(IEnumerable<String> groupIdentities, String domainController = null, NetworkCredential credential = null, Nullable<TimeSpan> timeout = null, Int32 maxDepth = 256, Int32 maxCacheSize = 10000, CancellationToken ct = null) #
Returns: GroupMembershipResult

Resolves members for a single group using a shared cache.

Parameters

groupIdentity System.String requiredposition: 0
Group identity in DN, SID, UPN or SAM format.
domainController System.String = null optionalposition: 1
Optional domain controller to query.
credential System.Net.NetworkCredential = null optionalposition: 2
Optional credentials used for binding.
timeout System.Nullable{System.TimeSpan} = null optionalposition: 3
Optional LDAP connection timeout. Defaults to 30 seconds.
maxDepth System.Int32 = 256 optionalposition: 4
Maximum recursion depth. Defaults to 256.
maxCacheSize System.Int32 = 10000 optionalposition: 5
Maximum cache size. Defaults to 10000 entries.
ct System.Threading.CancellationToken = null optionalposition: 6
A cancellation token.
ResolveMembers(System.String[] groupIdentities, System.String domainController, System.Net.NetworkCredential credential, System.Nullable{System.TimeSpan} timeout, System.Int32 maxDepth, System.Int32 maxCacheSize, System.Threading.CancellationToken ct) #

Resolves members for multiple groups using a shared cache.

Parameters

groupIdentities System.String[] required
Group identities in DN, SID, UPN or SAM format.
domainController System.String required
Optional domain controller to query.
credential System.Net.NetworkCredential required
Optional credentials used for binding.
timeout System.Nullable{System.TimeSpan} required
Optional LDAP connection timeout. Defaults to 30 seconds.
maxDepth System.Int32 required
Maximum recursion depth. Defaults to 256.
maxCacheSize System.Int32 required
Maximum cache size. Defaults to 10000 entries.
ct System.Threading.CancellationToken required
A cancellation token.
ResolveMembers(System.Collections.Generic.IEnumerable{System.String} groupIdentities, System.String domainController, System.Net.NetworkCredential credential, System.Nullable{System.TimeSpan} timeout, System.Int32 maxDepth, System.Int32 maxCacheSize, System.Threading.CancellationToken ct) #

Resolves members for multiple groups using a shared cache.

Parameters

groupIdentities System.Collections.Generic.IEnumerable{System.String} required
Group identities in DN, SID, UPN or SAM format.
domainController System.String required
Optional domain controller to query.
credential System.Net.NetworkCredential required
Optional credentials used for binding.
timeout System.Nullable{System.TimeSpan} required
Optional LDAP connection timeout. Defaults to 30 seconds.
maxDepth System.Int32 required
Maximum recursion depth. Defaults to 256.
maxCacheSize System.Int32 required
Maximum cache size. Defaults to 10000 entries.
ct System.Threading.CancellationToken required
A cancellation token.
public GroupMembershipResult ResolveMembers(IEnumerable<String> groupIdentities, CancellationToken ct) #
Returns: GroupMembershipResult

Gets members of the specified group.

Parameters

groupIdentity System.String requiredposition: 0
Group identity in DN, SID, UPN or SAM format.
ct System.Threading.CancellationToken requiredposition: 1
A cancellation token.
ResolveMembers(System.String[] groupIdentities, System.Threading.CancellationToken ct) #

Gets members of the specified groups.

Parameters

groupIdentities System.String[] required
Group identities in DN, SID, UPN or SAM format.
ct System.Threading.CancellationToken required
A cancellation token.
ResolveMembers(System.Collections.Generic.IEnumerable{System.String} groupIdentities, System.Threading.CancellationToken ct) #

Gets members of the specified groups.

Parameters

groupIdentities System.Collections.Generic.IEnumerable{System.String} required
Group identities in DN, SID, UPN or SAM format.
ct System.Threading.CancellationToken required
A cancellation token.
ResolveMembersAsync 6 overloads
public static async Task<GroupMembershipResult> ResolveMembersAsync(IEnumerable<String> groupIdentities, String domainController = null, NetworkCredential credential = null, Nullable<TimeSpan> timeout = null, Int32 maxDepth = 256, Int32 maxCacheSize = 10000, CancellationToken ct = null) #
Returns: Task<GroupMembershipResult>

Resolves members for a single group using a shared cache.

Parameters

groupIdentity System.String requiredposition: 0
Group identity in DN, SID, UPN or SAM format.
domainController System.String = null optionalposition: 1
Optional domain controller to query.
credential System.Net.NetworkCredential = null optionalposition: 2
Optional credentials used for binding.
timeout System.Nullable{System.TimeSpan} = null optionalposition: 3
Optional LDAP connection timeout. Defaults to 30 seconds.
maxDepth System.Int32 = 256 optionalposition: 4
Maximum recursion depth. Defaults to 256.
maxCacheSize System.Int32 = 10000 optionalposition: 5
Maximum cache size. Defaults to 10000 entries.
ct System.Threading.CancellationToken = null optionalposition: 6
A cancellation token.
ResolveMembersAsync(System.String[] groupIdentities, System.String domainController, System.Net.NetworkCredential credential, System.Nullable{System.TimeSpan} timeout, System.Int32 maxDepth, System.Int32 maxCacheSize, System.Threading.CancellationToken ct) #

Resolves members for multiple groups using a shared cache.

Parameters

groupIdentities System.String[] required
Group identities in DN, SID, UPN or SAM format.
domainController System.String required
Optional domain controller to query.
credential System.Net.NetworkCredential required
Optional credentials used for binding.
timeout System.Nullable{System.TimeSpan} required
Optional LDAP connection timeout. Defaults to 30 seconds.
maxDepth System.Int32 required
Maximum recursion depth. Defaults to 256.
maxCacheSize System.Int32 required
Maximum cache size. Defaults to 10000 entries.
ct System.Threading.CancellationToken required
A cancellation token.
ResolveMembersAsync(System.Collections.Generic.IEnumerable{System.String} groupIdentities, System.String domainController, System.Net.NetworkCredential credential, System.Nullable{System.TimeSpan} timeout, System.Int32 maxDepth, System.Int32 maxCacheSize, System.Threading.CancellationToken ct) #

Resolves members for multiple groups using a shared cache.

Parameters

groupIdentities System.Collections.Generic.IEnumerable{System.String} required
Group identities in DN, SID, UPN or SAM format.
domainController System.String required
Optional domain controller to query.
credential System.Net.NetworkCredential required
Optional credentials used for binding.
timeout System.Nullable{System.TimeSpan} required
Optional LDAP connection timeout. Defaults to 30 seconds.
maxDepth System.Int32 required
Maximum recursion depth. Defaults to 256.
maxCacheSize System.Int32 required
Maximum cache size. Defaults to 10000 entries.
ct System.Threading.CancellationToken required
A cancellation token.
public Task<GroupMembershipResult> ResolveMembersAsync(IEnumerable<String> groupIdentities, CancellationToken ct) #
Returns: Task<GroupMembershipResult>

Gets members of the specified group.

Parameters

groupIdentity System.String requiredposition: 0
Group identity in DN, SID, UPN or SAM format.
ct System.Threading.CancellationToken requiredposition: 1
A cancellation token.
ResolveMembersAsync(System.String[] groupIdentities, System.Threading.CancellationToken ct) #

Gets members of the specified groups.

Parameters

groupIdentities System.String[] required
Group identities in DN, SID, UPN or SAM format.
ct System.Threading.CancellationToken required
A cancellation token.
ResolveMembersAsync(System.Collections.Generic.IEnumerable{System.String} groupIdentities, System.Threading.CancellationToken ct) #

Gets members of the specified groups.

Parameters

groupIdentities System.Collections.Generic.IEnumerable{System.String} required
Group identities in DN, SID, UPN or SAM format.
ct System.Threading.CancellationToken required
A cancellation token.
ResolveParentGroups 6 overloads
public static GroupParentResult ResolveParentGroups(IEnumerable<String> identities, String domainController = null, NetworkCredential credential = null, Nullable<TimeSpan> timeout = null, Int32 maxDepth = 256, Int32 maxCacheSize = 10000, CancellationToken ct = null) #
Returns: GroupParentResult

Gets parent groups of the specified identity using a shared cache.

Parameters

identity System.String requiredposition: 0
Object identity in DN, SID, UPN or SAM format.
domainController System.String = null optionalposition: 1
Optional domain controller to query.
credential System.Net.NetworkCredential = null optionalposition: 2
Optional credentials used for binding.
timeout System.Nullable{System.TimeSpan} = null optionalposition: 3
Optional LDAP connection timeout. Defaults to 30 seconds.
maxDepth System.Int32 = 256 optionalposition: 4
Maximum recursion depth. Defaults to 256.
maxCacheSize System.Int32 = 10000 optionalposition: 5
Maximum cache size. Defaults to 10000 entries.
ct System.Threading.CancellationToken = null optionalposition: 6
A cancellation token.
ResolveParentGroups(System.String[] identities, System.String domainController, System.Net.NetworkCredential credential, System.Nullable{System.TimeSpan} timeout, System.Int32 maxDepth, System.Int32 maxCacheSize, System.Threading.CancellationToken ct) #

Gets parent groups of the specified identities using a shared cache.

Parameters

identities System.String[] required
Object identities in DN, SID, UPN or SAM format.
domainController System.String required
Optional domain controller to query.
credential System.Net.NetworkCredential required
Optional credentials used for binding.
timeout System.Nullable{System.TimeSpan} required
Optional LDAP connection timeout. Defaults to 30 seconds.
maxDepth System.Int32 required
Maximum recursion depth. Defaults to 256.
maxCacheSize System.Int32 required
Maximum cache size. Defaults to 10000 entries.
ct System.Threading.CancellationToken required
A cancellation token.
ResolveParentGroups(System.Collections.Generic.IEnumerable{System.String} identities, System.String domainController, System.Net.NetworkCredential credential, System.Nullable{System.TimeSpan} timeout, System.Int32 maxDepth, System.Int32 maxCacheSize, System.Threading.CancellationToken ct) #

Gets parent groups of the specified identities using a shared cache.

Parameters

identities System.Collections.Generic.IEnumerable{System.String} required
Object identities in DN, SID, UPN or SAM format.
domainController System.String required
Optional domain controller to query.
credential System.Net.NetworkCredential required
Optional credentials used for binding.
timeout System.Nullable{System.TimeSpan} required
Optional LDAP connection timeout. Defaults to 30 seconds.
maxDepth System.Int32 required
Maximum recursion depth. Defaults to 256.
maxCacheSize System.Int32 required
Maximum cache size. Defaults to 10000 entries.
ct System.Threading.CancellationToken required
A cancellation token.
public GroupParentResult ResolveParentGroups(IEnumerable<String> identities, CancellationToken ct) #
Returns: GroupParentResult

Gets parent groups of the specified identity.

Parameters

identity System.String requiredposition: 0
Object identity in DN, SID, UPN or SAM format.
ct System.Threading.CancellationToken requiredposition: 1
A cancellation token.
ResolveParentGroups(System.String[] identities, System.Threading.CancellationToken ct) #

Gets parent groups of the specified identities.

Parameters

identities System.String[] required
Object identities in DN, SID, UPN or SAM format.
ct System.Threading.CancellationToken required
A cancellation token.
ResolveParentGroups(System.Collections.Generic.IEnumerable{System.String} identities, System.Threading.CancellationToken ct) #

Gets parent groups of the specified identities.

Parameters

identities System.Collections.Generic.IEnumerable{System.String} required
Object identities in DN, SID, UPN or SAM format.
ct System.Threading.CancellationToken required
A cancellation token.
ResolveParentGroupsAsync 6 overloads
public static async Task<GroupParentResult> ResolveParentGroupsAsync(IEnumerable<String> identities, String domainController = null, NetworkCredential credential = null, Nullable<TimeSpan> timeout = null, Int32 maxDepth = 256, Int32 maxCacheSize = 10000, CancellationToken ct = null) #
Returns: Task<GroupParentResult>

Gets parent groups of the specified identity using a shared cache.

Parameters

identity System.String requiredposition: 0
Object identity in DN, SID, UPN or SAM format.
domainController System.String = null optionalposition: 1
Optional domain controller to query.
credential System.Net.NetworkCredential = null optionalposition: 2
Optional credentials used for binding.
timeout System.Nullable{System.TimeSpan} = null optionalposition: 3
Optional LDAP connection timeout. Defaults to 30 seconds.
maxDepth System.Int32 = 256 optionalposition: 4
Maximum recursion depth. Defaults to 256.
maxCacheSize System.Int32 = 10000 optionalposition: 5
Maximum cache size. Defaults to 10000 entries.
ct System.Threading.CancellationToken = null optionalposition: 6
A cancellation token.
ResolveParentGroupsAsync(System.String[] identities, System.String domainController, System.Net.NetworkCredential credential, System.Nullable{System.TimeSpan} timeout, System.Int32 maxDepth, System.Int32 maxCacheSize, System.Threading.CancellationToken ct) #

Gets parent groups of the specified identities using a shared cache.

Parameters

identities System.String[] required
Object identities in DN, SID, UPN or SAM format.
domainController System.String required
Optional domain controller to query.
credential System.Net.NetworkCredential required
Optional credentials used for binding.
timeout System.Nullable{System.TimeSpan} required
Optional LDAP connection timeout. Defaults to 30 seconds.
maxDepth System.Int32 required
Maximum recursion depth. Defaults to 256.
maxCacheSize System.Int32 required
Maximum cache size. Defaults to 10000 entries.
ct System.Threading.CancellationToken required
A cancellation token.
ResolveParentGroupsAsync(System.Collections.Generic.IEnumerable{System.String} identities, System.String domainController, System.Net.NetworkCredential credential, System.Nullable{System.TimeSpan} timeout, System.Int32 maxDepth, System.Int32 maxCacheSize, System.Threading.CancellationToken ct) #

Gets parent groups of the specified identities using a shared cache.

Parameters

identities System.Collections.Generic.IEnumerable{System.String} required
Object identities in DN, SID, UPN or SAM format.
domainController System.String required
Optional domain controller to query.
credential System.Net.NetworkCredential required
Optional credentials used for binding.
timeout System.Nullable{System.TimeSpan} required
Optional LDAP connection timeout. Defaults to 30 seconds.
maxDepth System.Int32 required
Maximum recursion depth. Defaults to 256.
maxCacheSize System.Int32 required
Maximum cache size. Defaults to 10000 entries.
ct System.Threading.CancellationToken required
A cancellation token.
public Task<GroupParentResult> ResolveParentGroupsAsync(IEnumerable<String> identities, CancellationToken ct) #
Returns: Task<GroupParentResult>

Gets parent groups of the specified identity.

Parameters

identity System.String requiredposition: 0
Object identity in DN, SID, UPN or SAM format.
ct System.Threading.CancellationToken requiredposition: 1
A cancellation token.
ResolveParentGroupsAsync(System.String[] identities, System.Threading.CancellationToken ct) #

Gets parent groups of the specified identities.

Parameters

identities System.String[] required
Object identities in DN, SID, UPN or SAM format.
ct System.Threading.CancellationToken required
A cancellation token.
ResolveParentGroupsAsync(System.Collections.Generic.IEnumerable{System.String} identities, System.Threading.CancellationToken ct) #

Gets parent groups of the specified identities.

Parameters

identities System.Collections.Generic.IEnumerable{System.String} required
Object identities in DN, SID, UPN or SAM format.
ct System.Threading.CancellationToken required
A cancellation token.