All Products
Search
Document Center

CloudSSO:GetUser

Last Updated:Jun 14, 2024

Queries information about a user.

Operation description

This topic provides an example on how to query information about the user whose ID is u-00q8wbq42wiltcrk**** in the d-00fc2p61**** directory.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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:
    • The required resource types are displayed in bold characters.
    • 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
cloudsso:GetUserRead
  • User
    acs:cloudsso:{#regionId}:{#accountId}:directory/{#DirectoryId}/user/{#UserId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
UserIdstringYes

The ID of the user.

u-00q8wbq42wiltcrk****
DirectoryIdstringYes

The ID of the resource directory.

d-00fc2p61****

Response parameters

ParameterTypeDescriptionExample
object

The returned results.

Userobject

The information about the user.

Statusstring

The status of the user. Valid values:

  • Enabled: The logon of the user is enabled.
  • Disabled: The logon of the user is disabled.
Enabled
UserNamestring

The name of the user.

Alice
Emailstring

The email address of the user.

Alice@example.com
Descriptionstring

The description of the user.

This is a user.
UserIdstring

The ID of the user.

u-00q8wbq42wiltcrk****
FirstNamestring

The first name of the user.

Alice
CreateTimestring

The time when the user was created. The value is displayed in UTC.

2021-10-26T03:03:42Z
ProvisionTypestring

The type of the user. Valid values:

  • Manual: The user is manually created.
  • Synchronized: The user is synchronized from an external identity provider (IdP).
Manual
DisplayNamestring

The display name of the user.

Alice
UpdateTimestring

The time when the information about the user was modified. The value is displayed in UTC.

2021-10-26T06:43:55Z
LastNamestring

The last name of the user.

Lee
ExternalIdobject

The identifier information about the user synchronized from an external IdP.

Idstring

The identifier of the user that is synchronized from an external IdP.

c73******a5fdd5
Issuerstring

The method for external identity synchronization. Only System for Cross-domain Identity Management (SCIM) synchronization is supported.

SCIM
RequestIdstring

The request ID.

EE42D2C4-A30A-59B7-ACEB-6D22FB44174A

Examples

Sample success responses

JSONformat

{
  "User": {
    "Status": "Enabled",
    "UserName": "Alice",
    "Email": "Alice@example.com",
    "Description": "This is a user.",
    "UserId": "u-00q8wbq42wiltcrk****",
    "FirstName": "Alice",
    "CreateTime": "2021-10-26T03:03:42Z",
    "ProvisionType": "Manual",
    "DisplayName": "Alice",
    "UpdateTime": "2021-10-26T06:43:55Z",
    "LastName": "Lee",
    "ExternalId": {
      "Id": "c73******a5fdd5",
      "Issuer": "SCIM"
    }
  },
  "RequestId": "EE42D2C4-A30A-59B7-ACEB-6D22FB44174A"
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-03-29The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.