Share via


Retrieve a User

 

Applies To: Windows Azure Pack

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

Method

Request URI

HTTP version

GET

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

None.

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 user that was retrieved. For more information, see User (Common object).

Example

The following code example shows a Get User request.

GET https://<computer>:30004/users/[email protected] 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": "[email protected]",
  "Email": "[email protected]",
  "State": 1,
  "CreatedTime": "2013-06-19T17:09:45.387",
  "SubscriptionCount": 1,
  "ActivationSyncState": 0,
  "LastErrorMessage": null
}

See Also

Common User Interfaces