Disable a User
Applies To: Windows Server 2012 Essentials
Deactivates a user in the domain.
URI Template
POST services/builtin/UserManagement.svc/user/{userSID}/disable
{userSID}
The security identifier (SID) of a user.
Sample Request
POST https://www.contoso.com/services/builtin/UserManagement.svc/user/S-1-5-21-2368054454-1126163612-438123800-1113/disable HTTP/1.1
Accept: application/xml
Cookie: ASP.NET_SessionId=********************
Canary: *********************
Host: domainname
Content-Length: 0
Sample Response
HTTP/1.1 200 OK
Error Codes
Error Code | Error Message |
---|---|
400 | One or more parameters are not valid. |
401 | Access is denied to the requested resource. |
404 | The path does not exist. |
500 | The user has already been disabled. |