Add a Standard User
Applies To: Windows Server 2012 Essentials
Creates a new standard user on the domain.
URI Template
POST services/builtin/UserManagement.svc/user/add?username={username}&firstname={firstName}&lastname={lastName}&remotewebaccess={remoteWebAccess}&vpnaccess={vpnAccess}
{userName}
The name to use for a user.
{firstName}
The first name of the user.
{lastName}
The last name of the user.
{remoteWebAccess}
true
to allow the user to have remote web access; otherwise, false
.
{vpnAccess}
true
to allow the user to have access to virtual private networks (VPNs); otherwise, false
.
Sample Request
POST https://www.contoso.com/services/builtin/UserManagement.svc/user/add?username=myusername&firstname=myfirstname&lastname=mylastname&remotewebaccess=True&vpnaccess=True HTTP/1.1
Accept: application/xml
Cookie: ASP.NET_SessionId=********************
Canary: *********************
Host: domainname
Content-Length: 85
Expect: 100-continue
<string xmlns="https://schemas.microsoft.com/2003/10/Serialization/">User@123</string>
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. |
403 | A user with the requested name already exists. |
404 | The path does not exist. |
Remarks
A user with domain administrator permission cannot be created with this method.