ActiveDirectoryService.GetRoles Method

Namespace:
Weavy.Core.Services
Assembly:
Weavy.Core.dll

GetRoles(PrincipalContext, IdentityType, string)

Get the list of roles of which the specified user is a member.

public static IEnumerable<Role> GetRoles(PrincipalContext context, IdentityType identityType, string identityValue)

Parameters

context
System.DirectoryServices.AccountManagement.PrincipalContext
identityType
System.DirectoryServices.AccountManagement.IdentityType

A IdentityType enumeration value that specifies the format of the identityValue parameter.

identityValue
string

The identity of the user principal.

Returns

System.Collections.Generic.IEnumerable

A list of Role objects.