Gets a user assigned to this computer role.


IAzRoleAssignment GetUser(IRole role, DirectoryEntry user)
IAzRoleAssignment GetUser(IRole role, SearchResult userSr)
IAzRoleAssignment GetUser(IRole role, string userDn)
IAzRoleAssignment GetUser(IRole role, IADsUser userIads)


Specify the following parameter when using this method:

Parameter Description


The role of the user.

Specify one of the following parameters when using this method.

Parameter Description


The directory entry for the user you want to add.


The directory entry for a user specified as a search result.


The user specified as a distinguished name.


The IADs interface to the user.

Return value

The computer role assignment for the specified user and role.


Any number of users can be assigned to a computer role and each of those users can have more than one role. Use this method to get the computer role assignment for a specific user and role. To get the user role assignment for a specific user, call the GetRoleAssignmentmethod.

The GetUser(IRole role, DirectoryEntry user) and GetUser(IRole role, SearchResult userSr) methods are available only for .NET-based programs; call Userfor VBScript.


GetUser may throw the following exceptions:

  • ApplicationException if cannot find the computer role in the zone; if it cannot find the specified role; if it cannot find authorization information for the zone; or if it failed to get the role assignment for some other reason.
  • ArgumentNullException if a specified parameter value is null.