All Products
Search
Document Center

CloudSSO:ListJoinedGroupsForUser

Last Updated:Mar 29, 2024

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.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
cloudsso:ListJoinedGroupsForUserList
  • User
    acs:cloudsso:{#regionId}:{#accountId}:directory/{#DirectoryId}/user/{#UserId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
UserIdstringYes

The ID of the user.

u-00q8wbq42wiltcrk****
DirectoryIdstringYes

The ID of the directory.

d-00fc2p61****
NextTokenstringNo

The token to return for the next page. If this is your first time to call this operation, you do not need to specify NextToken .

When you call this operation for the first time, if the total number of entries to return exceeds the value of MaxResults, the entries are truncated. Only the entries that match the value of MaxResults are returned, and the excess entries are not returned. In this case, the value of the response parameter IsTruncated is true, and NextToken is returned. In the next call, you can use the value of NextToken and maintain the settings of the other request parameters to query the excess entries. You can repeat the call until the value of IsTruncated becomes false. This way, all entries are returned.

K1c3o9K7pFxoTtxH1Nm7MMLb7zrDGvftYBQBPDVv7AD3a8yhRb3Mk8L9ivmN6bFSjfkZNTAg3h4****
MaxResultsintegerNo

The number of entries to return on each page.

Valid values: 1 to 100.

Default value: 10.

10

Response parameters

ParameterTypeDescriptionExample
object
NextTokenstring

The token that is returned for the next page.

Note This parameter is returned only when the value of IsTruncated is true.
K1c3o9K7pFxoTtxH1Nm7MMLb7zrDGvftYBQBPDVv7AD3a8yhRb3Mk8L9ivmN6bFSjfkZNTAg3h4****
RequestIdstring

The ID of the request.

E9BBB45F-7877-5DE9-96A5-20E6CFA48929
TotalCountsinteger

The total number of entries returned.

2
MaxResultsinteger

The number of entries returned per page.

10
IsTruncatedboolean

Indicates whether the queried entries are truncated. Valid values:

  • true: The queried entries are truncated.
  • false: The queried entries are not truncated.
false
JoinedGroupsobject []

The groups to which the user is added.

GroupNamestring

The name of the group.

TestGroup
Descriptionstring

The description of the group.

This is a group.
UserIdstring

The ID of the user.

u-00q8wbq42wiltcrk****
ProvisionTypestring

The type of the group. Valid values:

  • Manual: The group is manually created.
  • Synchronized: The user is synchronized from an external identity provider (IdP).
Manual
JoinTimestring

The time when the user was added to the user group.

2021-11-01T06:58:18Z
GroupIdstring

The ID of the group.

g-00jqzghi2n3o5hkh****

Examples

Sample success responses

JSONformat

{
  "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

For a list of error codes, visit the Service error codes.