All Products
Search
Document Center

Identity as a Service:GetUser

Last Updated:Jul 25, 2025

Queries the details of an account in Identity as a Service (IDaaS) Employee IAM (EIAM).

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
eiam:GetUserget
*User
acs:eiam:{#regionId}:{#accountId}:instance/{#InstanceId}/user/{#UserId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the instance.

idaas_ue2jvisn35ea5lmthk267xxxxx
UserIdstringYes

The ID of the account.

user_d6sbsuumeta4h66ec3il7yxxxx

Response parameters

ParameterTypeDescriptionExample
object

The response data.

RequestIdstring

The ID of the request.

0441BD79-92F3-53AA-8657-F8CE4A2B912A
Userobject

The data object of the account.

UserIdstring

The ID of the account.

user_d6sbsuumeta4h66ec3il7yxxxx
Usernamestring

The username of the account.

name001
DisplayNamestring

The display name of the account.

display_name001
PasswordSetboolean

Indicates whether a password is set.

false
PhoneRegionstring

The country code of the mobile number. For example, the country code of China is 86 without 00 or +.

86
PhoneNumberstring

The mobile number of the user who owns the account.

156xxxxxxx
PhoneNumberVerifiedboolean

Indicates whether the mobile number has been verified. A value of true indicates that the mobile number has been verified by the user or has been set to the verified status by the administrator. A value of false indicates that the mobile number has not been verified.

true
Emailstring

The email address of the user who owns the account.

user@example.com
EmailVerifiedboolean

Indicates whether the email address has been verified. A value of true indicates that the email address has been verified by the user or has been set to the verified status by the administrator. A value of false indicates that the email address has not been verified.

true
UserExternalIdstring

The external ID of the account. The external ID can be used by external data to map the data of the account in IDaaS EIAM. By default, the external ID is the account ID.

For accounts with the same source type and source ID, each account has a unique external ID.

user_d6sbsuumeta4h66ec3il7yxxxx
UserSourceTypestring

The source type of the account. Valid values:

  • build_in: The account was created in IDaaS.
  • ding_talk: The account was imported from DingTalk.
  • ad: The account was imported from Microsoft Active Directory (AD).
  • ldap: The account was imported from a Lightweight Directory Access Protocol (LDAP) service.
build_in
UserSourceIdstring

The source ID of the account.

If the account was created in IDaaS, its source ID is the ID of the IDaaS instance. If the account was imported, its source ID is the enterprise ID in the source. For example, if the account was imported from DingTalk, its source ID is the corpId value of the enterprise in DingTalk.

idaas_ue2jvisn35ea5lmthk267xxxxx
Statusstring

The status of the account. Valid values:

  • enabled: The account is enabled.
  • disabled: The account is disabled.
enabled
AccountExpireTimelong

The time when the account expires. This value is a UNIX timestamp. Unit: milliseconds.

1652085686179
PasswordExpireTimelong

The time when the password of the account expires. This value is a UNIX timestamp. Unit: milliseconds.

  • If the value -1 is returned, the password does not expire.
  • If no value is returned, the password does not expire.
  • If a UNIX timestamp is returned, the password expires at the indicated point of time.
1652085686179
RegisterTimelong

The time when the account was registered. This value is a UNIX timestamp. Unit: milliseconds.

1652085686179
LockExpireTimelong

The time when the account lock expires. This value is a UNIX timestamp. Unit: milliseconds.

1652085686179
CreateTimelong

The time when the account was created. This value is a UNIX timestamp. Unit: milliseconds.

1652085686179
UpdateTimelong

The time when the account was last updated. The value is a UNIX timestamp. Unit: milliseconds.

1652085686179
Descriptionstring

The description of the account.

Test account
OrganizationalUnitsarray<object>

The organizational units to which the account belongs.

OrganizationalUnitobject

The data object of the organizational unit.

OrganizationalUnitIdstring

The ID of the organizational unit.

ou_wovwffm62xifdziem7an7xxxxx
OrganizationalUnitNamestring

The name of the organizational unit.

test_ou_name
Primaryboolean

Indicates whether the organization is the primary organization.

true
PrimaryOrganizationalUnitIdstring

The ID of the primary organizational unit to which the account belongs.

ou_wovwffm62xifdziem7an7xxxxx
CustomFieldsarray<object>

The list of custom fields that describe the account.

CustomFieldobject

The data object of the custom field.

FieldNamestring

The identifier of the custom field.

age
FieldValuestring

The value of the custom field.

10
Groupsarray<object>

The organizational units to which the account belongs.

Groupobject
GroupIdstring

The ID of the organizational unit.

group_d6sbsuumeta4h66ec3il7yxxxx
GroupNamestring

The name of the organizational unit.

group_test_name
Descriptionstring

The description of the organizational unit.

this is a test.
InstanceIdstring

The ID of the instance

idaas_ue2jvisn35ea5lmthk267xxxxx
PreferredLanguagestring

Preferred language

en-US

Examples

Sample success responses

JSONformat

{
  "RequestId": "0441BD79-92F3-53AA-8657-F8CE4A2B912A",
  "User": {
    "UserId": "user_d6sbsuumeta4h66ec3il7yxxxx",
    "Username": "name001",
    "DisplayName": "display_name001",
    "PasswordSet": false,
    "PhoneRegion": 86,
    "PhoneNumber": "156xxxxxxx",
    "PhoneNumberVerified": true,
    "Email": "user@example.com",
    "EmailVerified": true,
    "UserExternalId": "user_d6sbsuumeta4h66ec3il7yxxxx",
    "UserSourceType": "build_in",
    "UserSourceId": "idaas_ue2jvisn35ea5lmthk267xxxxx",
    "Status": "enabled",
    "AccountExpireTime": 1652085686179,
    "PasswordExpireTime": 1652085686179,
    "RegisterTime": 1652085686179,
    "LockExpireTime": 1652085686179,
    "CreateTime": 1652085686179,
    "UpdateTime": 1652085686179,
    "Description": "Test account\n",
    "OrganizationalUnits": [
      {
        "OrganizationalUnitId": "ou_wovwffm62xifdziem7an7xxxxx",
        "OrganizationalUnitName": "test_ou_name",
        "Primary": true
      }
    ],
    "PrimaryOrganizationalUnitId": "ou_wovwffm62xifdziem7an7xxxxx",
    "CustomFields": [
      {
        "FieldName": "age",
        "FieldValue": 10
      }
    ],
    "Groups": [
      {
        "GroupId": "group_d6sbsuumeta4h66ec3il7yxxxx",
        "GroupName": "group_test_name",
        "Description": "this is a test."
      }
    ],
    "InstanceId": "idaas_ue2jvisn35ea5lmthk267xxxxx",
    "PreferredLanguage": "en-US"
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-03-12The response structure of the API has changedView Change Details
2023-03-21API Description Update. The response structure of the API has changedView Change Details