How can I get UserId
for AWS SSO Users using Boto3.
I wanted to use it to assign permissions to a user for a specific aws account using below code, however, this requires PrincipalId
which is some 16-20 digit number associated with each user and is called User ID
in the AWS console.
You can read about it - here
response = client.create_account_assignment(
InstanceArn='string',
TargetId='string',
TargetType='AWS_ACCOUNT',
PermissionSetArn='string',
PrincipalType='USER'|'GROUP',
PrincipalId='string'
)