Querying IAM User Details (Recommended)
Function
This API can be used by the administrator to query the details about a specified IAM user or used by an IAM user to query their own details.
The API can be called using both the global endpoint and region-specific endpoints. For IAM endpoints, see Regions and Endpoints.
URI
GET /v3.0/OS-USER/users/{user_id}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| user_id | Yes | String | IAM user ID. For details about how to obtain a user ID, see Obtaining Account, IAM User, Group, Project, Region, and Agency Information. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | A token with Security Administrator permissions is required if the administrator is requesting to query the details about a specified IAM user. If an IAM user is requesting to query their own details, the user token (no special permission requirements) of the user is required. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| Object | IAM user information. |
| Parameter | Type | Description |
|---|---|---|
| enabled | Boolean | Enabling status of the IAM user. true (default value) indicates that the user is enabled. false indicates that the user is disabled. |
| id | String | IAM user ID. |
| domain_id | String | ID of the account to which the IAM user belongs. |
| name | String | IAM user name. |
| Object | IAM user resource link information. | |
| xuser_id | String | ID of the IAM user in the external system. |
| xuser_type | String | Type of the IAM user in the external system. |
| areacode | String | Country code. |
| | String | Email address. |
| phone | String | Mobile number. |
| pwd_status | Boolean | Password status. true means that the password needs to be changed, and false means that the password is normal. |
| update_time | String | Time when the IAM user was last updated. |
| create_time | String | Time when the IAM user was created. |
| last_login_time | String | Last login time of the IAM user. |
| pwd_strength | String | Password strength. The value can be Low, Medium, Strong, or None. |
| is_domain_owner | Boolean | Indicates whether the IAM user is an account administrator. |
| access_mode | String | Access type of the IAM user.
|
| description | String | Description of the IAM user. |
Example Request
GET https://iam.myhuaweicloud.com/v3.0/OS-USER/users/{user_id} Example Response
Status code: 200
The request is successful.
{
"id" : "",
"xuser_type" : "",
"email" : "",
"user" : {
"pwd_strength" : "Strong",
"create_time" : "2020-07-08 02:19:03.0",
"last_login_time" : null,
"areacode" : "",
"enabled" : true,
"domain_id" : "086ba757f90089cf0fe5c000dbe7f...",
"xuser_id" : "",
"pwd_status" : false,
"update_time" : null,
"phone" : "-",
"is_domain_owner" : false,
"access_mode" : "default",
"name" : "autotest1",
"links" : {
"next" : null,
"previous" : null,
"self" : "https://iam.huaweicloud.com/v3.0/OS-USER/users/093f75808b8089ba1f6dc000c7cac..."
},
"id" : "093f75808b8089ba1f6dc000c7cac...",
"xuser_type" : "",
"email" : "",
"description" : "aaa"
}
} Status Codes
| Status Code | Description |
|---|---|
| 200 | The request is successful. |
| 403 | Access denied. |
| 404 | The requested resource cannot be found. |
| 405 | The method specified in the request is not allowed for the requested resource. |
| 500 | Internal server error. |
Error Codes
For details, see Error Codes.
Last Article: Listing IAM Users
Next Article: Querying IAM User Details
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.