Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Identity and Access Management/ API Reference/ API/ IAM User Management/ Querying IAM User Details (Recommended)

Querying IAM User Details (Recommended)

Updated on 2024-11-18 GMT+08:00

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.

Debugging

You can debug this API in API Explorer.

URI

GET /v3.0/OS-USER/users/{user_id}

Table 1 URI parameters

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

Table 2 Parameters in the request header

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

If the administrator is requesting to query IAM user details, see Actions.

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

Table 3 Parameters in the response body

Parameter

Type

Description

user

Object

IAM user information.

Table 4 user

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 used to create the IAM user.

name

String

IAM username.

links

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.

email

String

Email address.

phone

String

Mobile number.

pwd_status

Boolean

Password status. true indicates that the password needs to be changed, and false indicates that the password is normal. If no password is set, this parameter may not be returned.

pwd_create_time

String

Time when the IAM user password was created and updated.

NOTE:

UTC time format: YYYY-MM-DD HH:mm:ss

modify_pwd_time

String

Time when the IAM user was last updated.

NOTE:

UTC time format: YYYY-MM-DD HH:mm:ss

update_time

String

Time when the IAM user was last updated.

NOTE:

UTC time format: YYYY-MM-DD HH:mm:ss

create_time

String

Time when the IAM user was created.

NOTE:

UTC time format: YYYY-MM-DD HH:mm:ss

last_login_time

String

Last login or access authentication time of the IAM user.

NOTE:

UTC time format: YYYY-MM-DD HH:mm:ss

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.

  • default: programmatic access and management console access. This option is the default access type.
  • programmatic: programmatic access
  • console: management console access

description

String

Description of the IAM user.

Example Request

Request for querying IAM user details, including the mobile number and email address of the IAM user

GET https://iam.myhuaweicloud.com/v3.0/OS-USER/users/{user_id}

Example Response

Status code: 200

The request is successful.

{
  "user" : {
    "pwd_strength" : "Strong",
    "create_time" : "2020-07-08 02:19:03.0",
    "pwd_create_time": "2022-10-13 07:35:12.0",
    "modify_pwd_time": "2022-10-13 07:35:12.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.myhuaweicloud.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.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback