Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have created a synapse workspace with a lakehouse and notebooks that i use to retrieve Power BI information from my tenant.
This include apps, workspaces, datasets, activity etc. hovewer, i want to retrieve dataset users and app users aswell.
To access these APIs i have created an App in my Azure portal which i have added in AD group and provided access to the following settings in Admin Portal,
1. Allow Service principals to use Power BI APIs
2. Allow Service principals to use read-only admin APIs
3. Enhance admin APIs responses with detailed metadata
4. Enhance admin APIs responses with dax and mashup expressions
for this i tought i could use the following APIs
https://learn.microsoft.com/en-us/rest/api/power-bi/admin/datasets-get-dataset-users-as-admin
https://learn.microsoft.com/en-us/rest/api/power-bi/admin/apps-get-app-users-as-admin
What i do is that i first retrieve dataset IDs (this works) and then loop over these IDs with this Python code inside my notebook.
#Get a list of datasets
Tenant.Read.All or Tenant.ReadWrite.All
Relevant only when authenticating via a standard delegated admin access token. Must not be present when authentication via a service principal is used.
i have no idea what it means with standard delegated admin access token so if anyone could help me out and get this Python code running against this API i would be very glad!
Solved! Go to Solution.
Edit: I solved this, it was a human error, when using chatGPT to clean up my code it was helpfull enough to change my API from Admin/ to regular. changing it back to admin API URL for Power BI solved the problem:)
Edit: I solved this, it was a human error, when using chatGPT to clean up my code it was helpfull enough to change my API from Admin/ to regular. changing it back to admin API URL for Power BI solved the problem:)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 9 | |
| 6 | |
| 4 | |
| 4 | |
| 3 |