SAP BTP: List Global Account Users and Role Collections by API

The BTP global account exposes user and role-collection APIs using a global-account API credential. SAP KBA 3662362 describes creating that credential with the btp CLI.

Create the credential in the right account

btp login --sso
btp create security/api-credential --name example-credential --global-account <global-account-id>

Securely retain the returned client ID, client secret, token URL and API URL. Request a client-credentials token at the returned token URL using Basic authorization with the client credentials.

Read the account data

Use the access token as Bearer authorization for:

GET <API_URL>/sap/rest/authorization/v2/rolecollections
GET <API_URL>/Users

Use the API URL returned for that credential rather than a guessed subaccount endpoint. Protect exported membership data and the secret; do not include them in screenshots.

SAP Help: Managing API Credentials

Reference

SAP Note 3662362

You May Also Like

Leave a Reply?