Retrieve a User

 

Applies To: Windows Azure Pack

Retrieves a user.

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 <UserName> with the user name.

Method

Request URI

HTTP version

GET

https://<ServiceMgmt>:<Port>/users/<UserName>

HTTP/1.1

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.

The response includes an HTTP status code, a set of response headers, and a response body.

A successful operation returns status code 200 (OK).

For information about status codes, see Status and Error Codes (Windows Azure Pack Service Management).

The response for this operation includes standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.

The following table describes the key elements of the response body:

Element name

Description

User

The user that was retrieved. For more information, see User (Common object).

The following code example shows a Get User request.

GET https://<computer>:30004/users/tom@tommy.com HTTP/1.1
Authorization: Bearer <token>
x-ms-client-request-id: 137c6d49-4740-42c0-a8a2-db24f34d9da1-2013-06-19 20:55:55Z
x-ms-client-session-id: d7401833-b959-4ac7-adba-c8b9d5c26326
x-ms-principal-id: <computer>\Administrator
Accept-Language: en-US
x-ms-principal-liveid: <computer>\Administrator
Host: <computer>:30004

The following code example shows a Get User response.

{
  "Name": "tom@tommy.com",
  "Email": "Tom@tommy.com",
  "State": 1,
  "CreatedTime": "2013-06-19T17:09:45.387",
  "SubscriptionCount": 1,
  "ActivationSyncState": 0,
  "LastErrorMessage": null
}
Show: