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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Doink
Regular Visitor

401 when using Admin APIs

Hi All we are buldinga a monitoring solution for PBI using powershell in SSMS to connect to PBI Admin APIs

Autentication is done using an SP that has:
PBI Service Tenant.ReadWrite.All
Fabric-Admin

the SP is member of a security group. In power bi Adminportal that groupp has been added under Access to protected Admin-APIs

we don´t have any premium or fabric kapacity.

we are geting a 401 when testing using this a small script that just trys to count number of workspaces. The group are not memeber in any WS.

 Any on that can help me figure out what we are missing?

BR 

1 ACCEPTED SOLUTION
v-nmadadi-msft
Community Support
Community Support

Hi @Doink ,

This is the interface to use if you want to retireve the list of workspaces, Please cross check if you are using the correct one.

GET https://api.fabric.microsoft.com/v1/workspaces


Reference: Workspaces - List Workspaces - REST API (Core) | Microsoft Learn

The required delegations scope for this is Workspace.Read.All or Workspace.ReadWrite.All

I hope this information helps. Please do let us know if you have any further queries.
Thank you

View solution in original post

3 REPLIES 3
v-nmadadi-msft
Community Support
Community Support

Hi @Doink 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.


Thank you.

v-nmadadi-msft
Community Support
Community Support

Hi @Doink ,

This is the interface to use if you want to retireve the list of workspaces, Please cross check if you are using the correct one.

GET https://api.fabric.microsoft.com/v1/workspaces


Reference: Workspaces - List Workspaces - REST API (Core) | Microsoft Learn

The required delegations scope for this is Workspace.Read.All or Workspace.ReadWrite.All

I hope this information helps. Please do let us know if you have any further queries.
Thank you

Doink
Regular Visitor

Can the issue be that we are using fabric admin and not PowerBI admin?

 

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.

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.