- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DescribeUserCommand
Retrieves the user metadata and attributes from the UserId
in an identity store.
If you have administrator access to a member account, you can use this API from the member account. Read about member accounts in the Organizations User Guide.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { IdentitystoreClient, DescribeUserCommand } from "@aws-sdk/client-identitystore"; // ES Modules import
// const { IdentitystoreClient, DescribeUserCommand } = require("@aws-sdk/client-identitystore"); // CommonJS import
const client = new IdentitystoreClient(config);
const input = { // DescribeUserRequest
IdentityStoreId: "STRING_VALUE", // required
UserId: "STRING_VALUE", // required
};
const command = new DescribeUserCommand(input);
const response = await client.send(command);
// { // DescribeUserResponse
// UserName: "STRING_VALUE",
// UserId: "STRING_VALUE", // required
// ExternalIds: [ // ExternalIds
// { // ExternalId
// Issuer: "STRING_VALUE", // required
// Id: "STRING_VALUE", // required
// },
// ],
// Name: { // Name
// Formatted: "STRING_VALUE",
// FamilyName: "STRING_VALUE",
// GivenName: "STRING_VALUE",
// MiddleName: "STRING_VALUE",
// HonorificPrefix: "STRING_VALUE",
// HonorificSuffix: "STRING_VALUE",
// },
// DisplayName: "STRING_VALUE",
// NickName: "STRING_VALUE",
// ProfileUrl: "STRING_VALUE",
// Emails: [ // Emails
// { // Email
// Value: "STRING_VALUE",
// Type: "STRING_VALUE",
// Primary: true || false,
// },
// ],
// Addresses: [ // Addresses
// { // Address
// StreetAddress: "STRING_VALUE",
// Locality: "STRING_VALUE",
// Region: "STRING_VALUE",
// PostalCode: "STRING_VALUE",
// Country: "STRING_VALUE",
// Formatted: "STRING_VALUE",
// Type: "STRING_VALUE",
// Primary: true || false,
// },
// ],
// PhoneNumbers: [ // PhoneNumbers
// { // PhoneNumber
// Value: "STRING_VALUE",
// Type: "STRING_VALUE",
// Primary: true || false,
// },
// ],
// UserType: "STRING_VALUE",
// Title: "STRING_VALUE",
// PreferredLanguage: "STRING_VALUE",
// Locale: "STRING_VALUE",
// Timezone: "STRING_VALUE",
// IdentityStoreId: "STRING_VALUE", // required
// };
DescribeUserCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
IdentityStoreId Required | string | undefined | The globally unique identifier for the identity store, such as |
UserId Required | string | undefined | The identifier for a user in the identity store. |
DescribeUserCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
IdentityStoreId Required | string | undefined | The globally unique identifier for the identity store. |
UserId Required | string | undefined | The identifier for a user in the identity store. |
Addresses | Address[] | undefined | The physical address of the user. |
DisplayName | string | undefined | The display name of the user. |
Emails | Email[] | undefined | The email address of the user. |
ExternalIds | ExternalId[] | undefined | A list of |
Locale | string | undefined | A string containing the geographical region or location of the user. |
Name | Name | undefined | The name of the user. |
NickName | string | undefined | An alternative descriptive name for the user. |
PhoneNumbers | PhoneNumber[] | undefined | A list of |
PreferredLanguage | string | undefined | The preferred language of the user. |
ProfileUrl | string | undefined | A URL link for the user's profile. |
Timezone | string | undefined | The time zone for a user. |
Title | string | undefined | A string containing the title of the user. |
UserName | string | undefined | A unique string used to identify the user. The length limit is 128 characters. This value can consist of letters, accented characters, symbols, numbers, and punctuation. This value is specified at the time the user is created and stored as an attribute of the user object in the identity store. |
UserType | string | undefined | A string indicating the type of user. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ResourceNotFoundException | client | Indicates that a requested resource is not found. |
ValidationException | client | The request failed because it contains a syntax error. |
AccessDeniedException | client | You do not have sufficient access to perform this action. |
InternalServerException | server | The request processing has failed because of an unknown error, exception or failure with an internal server. |
ThrottlingException | client | Indicates that the principal has crossed the throttling limits of the API operations. |
IdentitystoreServiceException | Base exception class for all service exceptions from Identitystore service. |