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
I’m trying to programmatically retrieve Power BI report subscription details using the Admin API endpoint:
GET https://api.powerbi.com/v1.0/myorg/admin/reports/{reportId}/subscriptions?$expand=users
Here's my setup:
- I registered an Azure AD app (client_id: [provide your ID]) and granted it API permissions:
- Power BI Service → Tenant.Read.All (Application type)
- I enabled **“Allow service principals to use Power BI APIs”** in the Power BI Admin Portal. - I'm using the client credentials (client_id + client_secret) flow to get an access token.
- The token request works and returns a valid token, but when I call the Admin API above, I receive: 401 Unauthorized.
Solved! Go to Solution.
Thanks for information, The Admin API worked when we "Enable service principal to access powerbi API" and Application permission in Azure portal for PowerBI service should not have Application based permission. Worked for me after I revoked admin consent for below permission.
--->Tenant.Read.All(Should not be Application type and Revoke admin consent)
I hope the information provided was helpful. If you still have questions, please don't hesitate to reach out to the community.
Thanks for information, The Admin API worked when we "Enable service principal to access powerbi API" and Application permission in Azure portal for PowerBI service should not have Application based permission. Worked for me after I revoked admin consent for below permission.
--->Tenant.Read.All(Should not be Application type and Revoke admin consent)
Glad to hear your issue was resolved, and thank you for sharing it with the community. This will be helpful for others facing similar problems. Please accept the relevant solution. If you have any further issues, please feel free to reach out to the community.
Thanks.
Hi @ajaynathreddy
@Akash_Varuna @pankajnamekar25 Thanks for your inputs.
Suggestions from them is very usefull, please ask for the Power BI Service Admin role & Retry the API call it may work for 401 error. please let us know once your try all above points.
Thanks.
Hi @ajaynathreddy The 401 error may occur if permissions or setup steps are incomplete. Ensure your Azure AD app has Tenant.Read.All permission, and admin consent has been granted. Verify the service principal has the appropriate role in Power BI Admin Portal (e.g., Service Administrator).
Hello @ajaynathreddy
Possible issue
Even with Tenant.Read.All, the 401 error occurs because Admin APIs require the app to be a Power BI Admin or have delegated user context — and application permissions alone won't work unless the service principal is granted Fabric admin rights.
Solution
Ensure the service principal is explicitly added as a Power BI Service Administrator in the Microsoft 365 Admin Center or is assigned Fabric (Power BI) Admin role via Azure AD. Without this, even with the correct API scopes, GET /admin/reports/{reportId}/subscriptions will return 401.
Thanks
If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
In powerbi admin portal, enabled service principal to access powerbi admin API and added a security group which has app as
member, does this permission not enable admin role for the application. Still do we need explicitely assign powerbi service admin role to the app in azure AD. Thank you for responding faster.
Hi @ajaynathreddy Ensure the app has the Power BI Service Admin role explicitly assigned in Azure AD, as adding it to a security group alone doesn’t grant this role. Verify that the security group is enabled for API access in the Power BI Admin Portal. Double-check the Tenant.Read.All permission with admin consent. Retry the API call using a valid token with the appropriate scope.
Yes I can confirm the security group is enabled to access the admin api in powerbi admin portal, and in azure ad given application permissions: Tenent.Read.All(both application and delegated type) and Tenent.ReadWrite.All(Application type) with admin consent granted. But did not give the application powerbi service admin role via Azure AD. I will ask my admin for it. Thanks.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!