2024 May 20 3:27 PM
Hi All,
I am following the BAS admin help documentation to get the list of users for a particular BAS instance
SAP BAS Export and Download Personal Data from Specific Users
I am able to get the output JSON in a browser by giving my credentials.
We are using SSO to our Azure AD. I would like to get the list programmatically, can someone help on how I can authenticate in NodeJS for this scenario.
Appreciate the help.
2024 May 21 7:38 AM
Hi,
First, the API can provide you a list of dev spaces, not of users. List of permitted users can be viewed in the BTP account cockpit, by searching the users assigned with the Business_Application_Studio_Developer role.
Regarding authentication, the SAP Business Application Studio admin APIs can be either authenticated via browser login, or by adding a JWT token of the admin user that was initiated by browser login, as a request header. See example here for how to initiate the token and attach it to the API requests: https://help.sap.com/docs/bas/sap-business-application-studio/restart-dev-space
If you use some code / pipeline to trigger such requests, you must initiate this token (manually) first, and inject it (securly) to your script. Then this token can be used as long as it is valid (depends on your BTP account security settings).
Please note that the intention of the admin APIs is to enable admin operations on-demand for the specific scenarios mentioned in the documentation, and not to be run automatically / periodically. Also, make sure to use personal data retrieved from these APIs with care, and according to law.
Thanks,
Rotem