Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All SamrDeleteUser (Opnum 35)

The SamrDeleteUser method removes a user object.

 long SamrDeleteUser(
   [in, out] SAMPR_HANDLE* UserHandle

UserHandle: An RPC context handle, as specified in section, representing a user object.

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 subject to the following constraints:

  1. The server MUST return an error if UserHandle.HandleType is not equal to "User".

  2. UserHandle.GrantedAccess MUST have the required access specified in section Otherwise, the server MUST return STATUS_ACCESS_DENIED.

  3. Let U be the object referenced by UserHandle.Object.

  4. All database operations MUST occur in a single transaction.

  5. If the RID of U's objectSid attribute value is less than 1000, an error MUST be returned.

  6. In the DC configuration, if U is a parent to another object, an error MUST be returned.<51>

  7. U MUST be removed from the database.

  8. The server MUST delete the SamContextHandle ADM element (section represented by UserHandle, and then MUST return 0 for the value of UserHandle and a return code of STATUS_SUCCESS.

© 2015 Microsoft