GetTenantUser
Queries a user in the current tenant by account ID and returns the account information and associated tenant roles.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
odps:GetTenantUser |
get |
*All Resource
|
None | None |
Request syntax
GET /api/v1/tenants/user HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| accountId |
string |
Yes |
The ID of the user account in the MaxCompute tenant. |
100931896542**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
PopResult |
||
| requestId |
string |
The unique identifier of the API request, which can be used to troubleshoot issues. |
0be3e0aa16667684362147582e038f |
| httpCode |
integer |
The HTTP status code of the request. |
200 |
| errorCode |
string |
The error code returned when the request fails. |
InvalidArgument |
| errorMsg |
string |
The error message returned when the request fails. |
The specified parameter is invalid. |
| data |
object |
The business data of the queried tenant user. |
|
| roles |
array |
The list of role names associated with the tenant user. |
|
|
string |
The name of the associated tenant role. |
analytics_reader |
|
| accountId |
string |
The ID of the user account in the MaxCompute tenant. |
100931896542**** |
| accountName |
string |
The account name of the tenant user. |
RAM$example:analytics_reader |
| displayName |
string |
The display name of the tenant user. |
analytics_reader |
| accountType |
string |
The account type of the tenant user. A value of sub indicates a RAM user. |
sub |
| tenantId |
string |
The ID of the MaxCompute tenant to which the user belongs. |
mc-tenant-123456 |
Examples
Success response
JSON format
{
"requestId": "0be3e0aa16667684362147582e038f",
"httpCode": 200,
"errorCode": "InvalidArgument",
"errorMsg": "The specified parameter is invalid.",
"data": {
"roles": [
"analytics_reader"
],
"accountId": "100931896542****",
"accountName": "RAM$example:analytics_reader",
"displayName": "analytics_reader",
"accountType": "sub",
"tenantId": "mc-tenant-123456"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.