User Roles within Subaccounts
Thursday, January 20, 2022 at 07:55amWe currently use subaccounts and to get the role of a user within a subaccount we have to check within each subaccount to see if they have access using the REST below
/account/senders/{senderId}/account/{subaccountId}/roles"
Is there a better way (since we have lots of subaccounts) to either ask for a specific user what roles they have within all possible subaccounts using a single call or within a subaccount who has what roles to avoid checking the roles of each user in each subaccount. With almost 200 subaccounts and over 1000 users this process takes a while to check all combinations.
Reply to: User Roles within Subaccounts
Tuesday, October 4, 2022 at 02:00pmHi Richard,
It's very nice to hear from you! There are new APIs exposed in recent releases to facilitate subaccount use cases, and I believe two of them could accommodate your requirement:
GET /api/account/senders/{senderId}/roles
Retrieves the account roles of a user across ALL subaccounts where the user has been assigned account roles.
GET /api/account/roles/{accountRoleId}/users
Within a subaccount, retrieve the user ID list who has been assigned a certain account role.
Duo