UserPrincipal.GetAuthorizationGroups Método
Definição
Retorna uma coleção de objetos de entidade de segurança que contém todos os grupos de autorização de que o usuário é membro.Returns a collection of principal objects that contains all the authorization groups of which this user is a member. Essa função retorna apenas grupos de segurança; grupos de distribuição não são retornados.This function only returns groups that are security groups; distribution groups are not returned.
public:
System::DirectoryServices::AccountManagement::PrincipalSearchResult<System::DirectoryServices::AccountManagement::Principal ^> ^ GetAuthorizationGroups();
public System.DirectoryServices.AccountManagement.PrincipalSearchResult<System.DirectoryServices.AccountManagement.Principal> GetAuthorizationGroups ();
member this.GetAuthorizationGroups : unit -> System.DirectoryServices.AccountManagement.PrincipalSearchResult<System.DirectoryServices.AccountManagement.Principal>
Public Function GetAuthorizationGroups () As PrincipalSearchResult(Of Principal)
Retornos
Uma coleção de objetos Principal que contêm os grupos de que o usuário é membro ou nulo se o usuário não pertencer a nenhum grupos.A collection of Principal objects that contain the groups of which the user is a member, or null if the user does not belong to any groups.
Exceções
Falha ao tentar recuperar os grupos de autorização.The attempt to retrieve authorization groups failed.
Esse sistema operacional não dá suporte à recuperação de grupos de autorização.The retrieval of authorization groups is not supported by this operating system.
Comentários
Esse método pesquisa todos os grupos recursivamente e retorna os grupos nos quais o usuário é membro.This method searches all groups recursively and returns the groups in which the user is a member. O conjunto retornado também pode incluir grupos adicionais para os quais o sistema consideraria o usuário membro para fins de autorização.The returned set may also include additional groups that system would consider the user a member of for authorization purposes.
Os grupos retornados por esse método podem incluir grupos de um escopo e armazenamento diferentes do que o principal.The groups that are returned by this method may include groups from a different scope and store than the principal. Por exemplo, se a entidade de segurança for um objeto AD DS que tem um DN de "CN = SpecialGroups, DC = Fabrikam, DC = com, o conjunto retornado poderá conter grupos que pertencem ao" CN = NormalGroups, DC = Fabrikam, DC = com.For example, if the principal is an AD DS object that has a DN of "CN=SpecialGroups,DC=Fabrikam,DC=com, the returned set can contain groups that belong to the "CN=NormalGroups,DC=Fabrikam,DC=com.