[ aws . cognito-idp ]

admin-get-user

Description

Gets the specified user by user name in a user pool as an administrator. Works on any user.

Calling this action requires developer credentials.

See also: AWS API Documentation

See ‘aws help’ for descriptions of global parameters.

Synopsis

  admin-get-user
--user-pool-id <value>
--username <value>
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]

Options

--user-pool-id (string)

The user pool ID for the user pool where you want to get information about the user.

--username (string)

The user name of the user you wish to retrieve.

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See ‘aws help’ for descriptions of global parameters.

Examples

To get a user

This example gets information about username jane@example.com.

Command:

aws cognito-idp admin-get-user --user-pool-id us-west-2_aaaaaaaaa --username jane@example.com

Output:

{
  "Username": "4320de44-2322-4620-999b-5e2e1c8df013",
  "Enabled": true,
  "UserStatus": "FORCE_CHANGE_PASSWORD",
  "UserCreateDate": 1548108509.537,
  "UserAttributes": [
      {
          "Name": "sub",
          "Value": "4320de44-2322-4620-999b-5e2e1c8df013"
      },
      {
          "Name": "email_verified",
          "Value": "true"
      },
      {
          "Name": "phone_number_verified",
          "Value": "true"
      },
      {
          "Name": "phone_number",
          "Value": "+01115551212"
      },
      {
          "Name": "email",
          "Value": "jane@example.com"
      }
  ],
  "UserLastModifiedDate": 1548108509.537
}

Output

Username -> (string)

The user name of the user about whom you are receiving information.

UserAttributes -> (list)

An array of name-value pairs representing user attributes.

(structure)

Specifies whether the attribute is standard or custom.

Name -> (string)

The name of the attribute.

Value -> (string)

The value of the attribute.

UserCreateDate -> (timestamp)

The date the user was created.

UserLastModifiedDate -> (timestamp)

The date the user was last modified.

Enabled -> (boolean)

Indicates that the status is enabled.

UserStatus -> (string)

The user status. Can be one of the following:

  • UNCONFIRMED - User has been created but not confirmed.

  • CONFIRMED - User has been confirmed.

  • ARCHIVED - User is no longer active.

  • COMPROMISED - User is disabled due to a potential security threat.

  • UNKNOWN - User status is not known.

  • RESET_REQUIRED - User is confirmed, but the user must request a code and reset his or her password before he or she can sign in.

  • FORCE_CHANGE_PASSWORD - The user is confirmed and the user can sign in using a temporary password, but on first sign-in, the user must change his or her password to a new value before doing anything else.

MFAOptions -> (list)

This response parameter is no longer supported. It provides information only about SMS MFA configurations. It doesn’t provide information about TOTP software token MFA configurations. To look up information about either type of MFA configuration, use UserMFASettingList instead.

(structure)

This data type is no longer supported. You can use it only for SMS MFA configurations. You can’t use it for TOTP software token MFA configurations.

DeliveryMedium -> (string)

The delivery medium to send the MFA code. You can use this parameter to set only the SMS delivery medium value.

AttributeName -> (string)

The attribute name of the MFA option type. The only valid value is phone_number .

PreferredMfaSetting -> (string)

The user’s preferred MFA setting.

UserMFASettingList -> (list)

The MFA options that are enabled for the user. The possible values in this list are SMS_MFA and SOFTWARE_TOKEN_MFA .

(string)