GetUser

Gets a user assigned to this computer role.

Syntax

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

Parameters

Specify the following parameter when using this method:

Parameter Description

role

The role of the user.

Specify one of the following parameters when using this method.

Parameter Description

user

The directory entry for the user you want to add.

userSr

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

userDn

The user specified as a distinguished name.

userIads

The IADs interface to the user.

Return value

The computer role assignment for the specified user and role.

Discussion

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.

Exceptions

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.