Using AWS CLI to list SSO User/group assigned to a permission set

Viewed 2958

I'm trying to get information about which User/group (within AWS accounts) is assigned to each permission set using AWS CLI.

In the AWS UI, this information is displayed here: (two black boxes on the bottom) enter image description here

In CLI, using SSO-admin I tried using list-accounts-for-provisioned-permission-set and list-permission-sets-provisioned-to-account but this did not get me this information.

I also tried list-account-assignments and got a "PrincipalId" for a permission set but I'm not sure if this refers to the "User/group" from the picture above. Is there anywhere I could see which PrincipalId belongs to each user/group?

Is there a way to access this information with AWS CLI?

UPDATE: I found some documentation regarding the "PrincipalId" from list-account-assignments:

An identifier for an object in Amazon Web Services SSO, such as a user or group. PrincipalIds are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more information about PrincipalIds in Amazon Web Services SSO, see the Amazon Web Services SSO Identity Store API Reference .

From the reference above I found the following:

The scope of these API operations is currently limited to only this functionality and does not include generic operations, such as listing all users or groups in the AWS SSO Identity Store.

Based on this I'm guessing that what I'm trying to do is currently impossible.

1 Answers
Related