Queries the groups to which a user is added.
Operation description
This topic provides an example on how to query the groups to which the user u-00q8wbq42wiltcrk**** is added. The returned result shows that the user is added to both the TestGroup and the group1 groups.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cloudsso:ListJoinedGroupsForUser |
list |
*User
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| UserId |
string |
Yes |
The ID of the user. |
u-00q8wbq42wiltcrk**** |
| DirectoryId |
string |
Yes |
The ID of the directory. |
d-00fc2p61**** |
| NextToken |
string |
No |
The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of When you call this operation for the first time, if the total number of entries to return is larger than the value of the |
K1c3o9K7pFxoTtxH1Nm7MMLb7zrDGvftYBQBPDVv7AD3a8yhRb3Mk8L9ivmN6bFSjfkZNTAg3h4**** |
| MaxResults |
integer |
No |
The number of entries per page. Valid values: 1 to 100. Default value: 10. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| NextToken |
string |
A pagination token. It can be used in the next request to retrieve a new page of results. Note
This parameter is returned only when the |
K1c3o9K7pFxoTtxH1Nm7MMLb7zrDGvftYBQBPDVv7AD3a8yhRb3Mk8L9ivmN6bFSjfkZNTAg3h4**** |
| RequestId |
string |
The request ID. |
E9BBB45F-7877-5DE9-96A5-20E6CFA48929 |
| TotalCounts |
integer |
The total number of entries returned. |
2 |
| MaxResults |
integer |
The number of entries per page. |
10 |
| IsTruncated |
boolean |
Indicates whether the queried entries are truncated. Valid values:
|
false |
| JoinedGroups |
array<object> |
The groups to which the user is added. |
|
|
object |
The group to which the user is added. |
||
| GroupName |
string |
The name of the group. |
TestGroup |
| Description |
string |
The description of the group. |
This is a group. |
| UserId |
string |
The ID of the user. |
u-00q8wbq42wiltcrk**** |
| ProvisionType |
string |
The type of the group. Valid values:
|
Manual |
| JoinTime |
string |
The time when the user was added to the group. The value is in the ISO 8601 standard in the |
2021-11-01T06:58:18Z |
| GroupId |
string |
The ID of the group. |
g-00jqzghi2n3o5hkh**** |
Examples
Success response
JSON format
{
"NextToken": "K1c3o9K7pFxoTtxH1Nm7MMLb7zrDGvftYBQBPDVv7AD3a8yhRb3Mk8L9ivmN6bFSjfkZNTAg3h4****",
"RequestId": "E9BBB45F-7877-5DE9-96A5-20E6CFA48929",
"TotalCounts": 2,
"MaxResults": 10,
"IsTruncated": false,
"JoinedGroups": [
{
"GroupName": "TestGroup",
"Description": "This is a group.",
"UserId": "u-00q8wbq42wiltcrk****",
"ProvisionType": "Manual",
"JoinTime": "2021-11-01T06:58:18Z",
"GroupId": "g-00jqzghi2n3o5hkh****"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.