Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

Powerbi Reports using SPN

Hi there,

 

I'm trying to report on all workspace's, DataSets associated to a datasource in our tenant.

We setup an spn with Tenant.Read.All delegated api permissions.

The Allow service principals to use Power BI APIs is enabled for the security group that the app is a member of.Created a client secret as well as certificate.We are able to connect using Connect-PowerBIServiceAccount to 

'however no data is returned.

When connecting using my account, i'm able to output the workspace that my account is a member of.

So i'm not sure if im missing other permissions to the workspaces.

5 REPLIES 5
d_gosbell
Super User
Super User

Sorry, that was the API for a single group, but this one gets multiple groups https://learn.microsoft.com/en-us/rest/api/power-bi/admin/groups-get-groups-as-admin 

d_gosbell
Super User
Super User

So that API says here that it requires the Workspace.Read.All permission, but then this API only returns workspaces that the SPN has access to.

 

If you want all workspaces you should probably look at using this API https://learn.microsoft.com/en-us/rest/api/power-bi/admin/groups-get-group-as-admin instead.

Anonymous
Not applicable

Thanks, it's limited however. You need to enter a groupID (workspace id). It doesn't allow to expand the search.

for example, you can't add $top=500 parameter to call the workspaces for example.

d_gosbell
Super User
Super User

What API are you trying to call? Some APIs like this https://learn.microsoft.com/en-us/rest/api/power-bi/admin/workspace-info-get-scan-result#:~:text=Mus....  one explicity state that Tenant.Read.All must not be set when using an SPN. So you should check the docs for the API you are trying to call.

Anonymous
Not applicable

Thanks @d_gosbell 

 
We are trying to report on all workspace, dataset's and
datasource.
 
I looked writing this in powershell with admin access, it does seem that I need workspace access?
 
Any thoughts on the best approch.
 
Very new to powerbi
 
 
 Many thanks
 
 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.