Queries user information.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetUser

The operation that you want to perform. Set the value to GetUser.

Tid Long Yes -1

The ID of the tenant.

Uid Long No 12334****

The Alibaba Cloud Uid of the user.

UserId String No 1**3

The ID of the user.

Response parameters

Prameter Type Sample response Description
ErrorCode String UnknownError

Error code

ErrorMessage String UnknownError

The error message.

RequestId String CFF30064-5985-4 ACB-B3F9-955759******

The ID of the request.

Success Boolean true

Indicates whether the request was successful.

User

User information

Mobile String 12345

Mobile phone number of user

NickName String nickName

The nickname of the user.

ParentUid Long 1234****

The Alibaba Cloud Uid of the primary account.

RoleIdList List 1

The list of role IDs.

RoleIds

The list of role IDs.

RoleNameList List Common user

The names of the roles that the user plays.

RoleNames

The name of the role that the user plays.

State String NORMAL

The status of the user.

Uid Long 124321****

The Alibaba Cloud Uid of the user.

UserId String 1**

The ID of the user.

Examples

Sample request


http(s)://[Endpoint]/? Action=GetUser
&Tid=-1
& <Common request parameters>

Sample success responses

XML format

<User>
    <RoleIdList>
        <RoleIds>1</RoleIds>
        <RoleIds>4</RoleIds>
        <RoleIds>3</RoleIds>
        <RoleIds>2</RoleIds>
    </RoleIdList>
    <State>NORMAL</State>
    <RoleNameList>
        <RoleNames> common user </RoleNames>
        <RoleNames> Security administrator </RoleNames>
        <RoleNames> Administrators </RoleNames>
        <RoleNames>DBA</RoleNames>
    </RoleNameList>
    <NickName>xxx</NickName>
    <ParentUid>11432****</ParentUid>
    <UserId>43****</UserId>
    <Uid>4123423****</Uid>
</User>
<RequestId>CFF30064-5985-4ACB-B3F9-955759******</RequestId>
<Success>true</Success>

JSON format

{
	"User":{
		"RoleIdList":{
			"RoleIds":[
				1,
				4,
				3,
				env
			]
		},
		"State":"NORMAL",
		"RoleNameList":{
			"RoleNames":[
				"Common User",
				"Security administrator",
				"Administrator",
				"DBA"
			]
		},
		"NickName":"xxx",
		"ParentUid":"11432****",
		"UserId":43****,
		"Uid":"4123423****"
	},
	"RequestId":"CFF30064-5985-4ACB-B3F9-955759******",
	"Success":true
}

Error codes

For a list of error codes, visit the API Error Center.