Update a User
Applies To: Windows Azure Pack
Updates a user.
Request
Replace <ServiceMgmt> with your Service Management API endpoint address. Replace <Port> with either 30005 for the tenant API or 30004 for the administrator API. Replace <Port> with either 30005 for the tenant API, or 30004 for the administrator API. Replace <UserName> with the user name of the user that is to be updated.
Method |
Request URI |
HTTP version |
---|---|---|
PUT |
https://<ServiceMgmt>:<Port>/users/<UserName> |
HTTP/1.1 |
URI Parameters
None.
Request Headers
The following table describes required and optional request headers.
Request header |
Description |
---|---|
Authorization: Bearer |
Required. Authorization bearer token. |
x-ms-principal-id |
Required. The principal identifier. |
x-ms-client-request-id |
Optional. The client request identifier. |
x-ms-client-session-id |
Optional. The client session identifier. |
x-ms-principal-liveid |
Optional. The principal Live identifier. |
Request Body
The following table describes the elements of the request body.
Element name |
Description |
---|---|
User |
The new information for the user. For more information, see User (Common object). |
Response
The response includes an HTTP status code, a set of response headers, and a response body.
Status Code
A successful operation returns status code 200 (OK).
For information about status codes, see Status and Error Codes (Windows Azure Pack Service Management).
Response Headers
The response for this operation includes standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.
Response Body
The following table describes the key elements of the response body:
Element name |
Description |
---|---|
User |
The updated user. For more information, see User (Common object). |
Example
The following code example shows an Update User request.
PUT https://<Computer>:30004/users/aaa@bbb.com HTTP/1.1
Authorization: Bearer <Token>
x-ms-client-request-id: 2028eab5-37c8-4e7a-84a9-558e7e33b3df-2013-06-27 21:32:23Z
x-ms-client-session-id: 9ff600b4-0c8b-4110-9eab-4228ce92aa4d
x-ms-principal-id: <COMPUTER>\Administrator
Accept-Language: en-US
x-ms-principal-liveid: <COMPUTER>\Administrator
Content-Type: application/json; charset=utf-8
Host: <Computer>:30004
Content-Length: 346
Expect: 100-continue
{
"Name": "aaa@bbb.com",
"Email": "aaa@bbb.com",
"State": 1,
"CreatedTime": "2013-06-27T21:15:30.787Z",
"SubscriptionCount": 1,
"ActivationSyncState": 0,
"LastErrorMessage": "One or more errors occurred while contacting the underlying resource providers. The operation may be partially completed. Details: The request to the underlying service has timed out."
}
The following code example shows an Update User response.
{
"Name": "aaa@bbb.com",
"Email": "aaa@bbb.com",
"State": 1,
"CreatedTime": "2013-06-27T21:15:30.787",
"SubscriptionCount": 1,
"ActivationSyncState": 0,
"LastErrorMessage": "One or more errors occurred while contacting the underlying resource providers. The operation may be partially completed. Details: The request to the underlying service has timed out."
}