msdn link

The SamrOpenUser method obtains a handle to a user, given a RID.

 long SamrOpenUser(
   [in] SAMPR_HANDLE DomainHandle,
   [in] unsigned long DesiredAccess,
   [in] unsigned long UserId,
   [out] SAMPR_HANDLE* UserHandle
 );

DomainHandle: An RPC context handle, as specified in section 2.2.7.2, representing a domain object.

DesiredAccess: An ACCESS_MASK that indicates the requested access for the returned handle. See section 2.2.1.7 for a list of user access values.

UserId: A RID of a user account.

UserHandle: An RPC context handle, as specified in section 2.2.7.2.

This protocol asks the RPC runtime, via the strict_context_handle attribute, to reject the use of context handles created by a method of a different RPC interface than this one, as specified in [MS-RPCE] section 3.

Upon receiving this message, the server MUST process the data from the message according to the constraints in section 3.1.5.1.6, with the following values: