GetAccessGroup
Gets a user group assigned to this computer role given a specific role.
Syntax
IAzRoleAssignment GetAccessGroup(IRole role, DirectoryEntry group)
IAzRoleAssignment GetAccessGroup(IRole role, SearchResult groupSr)
IAzRoleAssignment GetAccessGroup(IRole role, string groupDn)
IAzRoleAssignment GetAccessGroup(IRole role, IADsGroup groupIAds)
Parameters
Specify the following parameter when using this method:
Parameter | Description |
---|---|
role
|
The role of the group. |
Specify one of the following parameters when using this method.
Parameter | Description |
---|---|
group
|
The directory entry for the group. |
groupSr
|
The directory entry for a group specified as a search result. |
groupDn
|
The group specified as a distinguished name. |
groupIads
|
The IADs interface to the group. |
Return value
The computer role assignment that includes the specified group
(IAzRoleAssignment.TrusteeType==Group
).
Discussion
Any number of user groups can be assigned to a computer role and each of those groups can have more than one role. Use this method to get the computer role assignment for a specific group and role.
The GetAccessGroup(IRole role, DirectoryEntry group)
and GetAccessGroup(IRole role, SearchResult groupSr)
methods are available only for .NET-based programs;
call AddRoleAssignment for VBScript.
Exceptions
GetAccessGroup
may throw one of the following exceptions:
-
ArgumentNullException
if the specified parameter value isnull
. -
ApplicationException
if the parameter value is not a valid group; or if it failed to get a role assignment because it cannot find the group.