Listing Accounts Associated with a User or User Group
Function
This API is used to list accounts associated with a user or user group. It can be called only from the organization's management account or from a delegated administrator account of a cloud service.
URI
GET /v1/instances/{instance_id}/account-assignments-for-principals
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
instance_id |
Yes |
String |
Globally unique ID of an IAM Identity Center instance. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
principal_id |
Yes |
String |
Globally unique ID of an IAM Identity Center principal. |
principal_type |
Yes |
String |
IAM Identity Center principal type. |
limit |
No |
Integer |
Maximum number of results returned for each request. |
marker |
No |
String |
Pagination marker. |
account_id |
No |
String |
Unique ID of a specified account. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Security-Token |
No |
String |
Security token (session token) of your temporary security credentials. If a temporary security credential is used, this header is required. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
account_assignments |
Array of AccountAssignmentDto objects |
List of account assignments that meet the search criteria. |
page_info |
PageInfoDto object |
Pagination information. |
Parameter |
Type |
Description |
---|---|---|
account_id |
String |
Unique ID of an account. |
permission_set_id |
String |
Unique ID of a permission set. |
principal_id |
String |
Unique ID of a principal (for example, a user or group) in IAM Identity Center. |
principal_type |
String |
Associated principal type. |
Parameter |
Type |
Description |
---|---|---|
next_marker |
String |
If present, more output is available than that included in the current response. To get the next part of the output, use this value in the request parameter in a subsequent call to the same API. You should repeat calling until the next_marker parameter is null in a response. |
current_count |
Integer |
Number of items returned on this page. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
request_id |
String |
Unique ID of a request. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
request_id |
String |
Unique ID of a request. |
encoded_authorization_message |
String |
Encrypted error message. |
Example Request
Listing accounts associated with a user or user group
GET https://{hostname}/v1/instances/{instance_id}/account-assignments-for-principals
Example Response
Status code: 200
Successful
{ "account_assignments" : [ { "account_id" : "8c1eef3a241945f69c3d3a6b0252e783", "permission_set_id" : "ps-389b8cf93d6aa3ad", "principal_id" : "4b969bc6-e8ed-47ce-b62b-936319e2bcb1", "principal_type" : "USER" }, { "account_id" : "8c1eef3a241945f69c3d3a6b0252e783", "permission_set_id" : "ps-e0edd386c8e95a4c", "principal_id" : "4b969bc6-e8ed-47ce-b62b-936319e2bcb1", "principal_type" : "USER" } ], "page_info" : { "next_marker" : null, "current_count" : 2 } }
Status Codes
Status Codes |
Description |
---|---|
200 |
Successful. |
400 |
Bad request. |
403 |
Forbidden. |
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot