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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
baraco
New Member

500 http error when trying to get fabric workspaces access details

Hi,

When using a GET to https://api.fabric.microsoft.com/v1/admin/workspaces/{workspaceId}/users with a valid and existing {workspaceId}, I'm getting a 500 htrtp error : 

{
    "requestId": "8dbd2d76-1244-4971-a590-284ea39e714c",
    "errorCode": "UnknownError",
    "message": "An error occurred while processing the operation"
}
 
I'm able to authenticate, generate a token with right scope (https://api.fabric.microsoft.com/.default) and also to correctly get the list of workspaces but not the workspaces access details.
Using this rest endpoint : 
 
Please help.
 
 
 
1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

Hi @baraco ,

 

After a bit of research, I was able to call this API, here are the steps:

1. First make sure you grant the Azure App Service Principal delegated permissions on Tenant.Read.All and or Tenant.ReadWrite.All.

vcgaomsft_1-1726732964688.png

vcgaomsft_7-1726734616403.png

 

2. Then refer to the steps in the documentation to create the security group, and then add Service principal to the member of the security group.

vcgaomsft_3-1726733566542.png

 

Enable service principal authentication for read-only admin APIs - Microsoft Fabric | Microsoft Lear...

Then go to Fabric admin potal, turn on Service principals can access read-only admin APIs, fill in the security group you just created and apply it.

vcgaomsft_2-1726733293826.png

And please enable the Service principals can use Fabric APIs.

vcgaomsft_4-1726734071709.png

3. Finally add the security group to Workspace:

vcgaomsft_8-1726734718472.png

 

Test api works fine:

vcgaomsft_9-1726734815216.png

I hope this helps!

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

2 REPLIES 2
v-cgao-msft
Community Support
Community Support

Hi @baraco ,

 

After a bit of research, I was able to call this API, here are the steps:

1. First make sure you grant the Azure App Service Principal delegated permissions on Tenant.Read.All and or Tenant.ReadWrite.All.

vcgaomsft_1-1726732964688.png

vcgaomsft_7-1726734616403.png

 

2. Then refer to the steps in the documentation to create the security group, and then add Service principal to the member of the security group.

vcgaomsft_3-1726733566542.png

 

Enable service principal authentication for read-only admin APIs - Microsoft Fabric | Microsoft Lear...

Then go to Fabric admin potal, turn on Service principals can access read-only admin APIs, fill in the security group you just created and apply it.

vcgaomsft_2-1726733293826.png

And please enable the Service principals can use Fabric APIs.

vcgaomsft_4-1726734071709.png

3. Finally add the security group to Workspace:

vcgaomsft_8-1726734718472.png

 

Test api works fine:

vcgaomsft_9-1726734815216.png

I hope this helps!

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

v-cgao-msft
Community Support
Community Support

Hi @baraco ,

 

I reproduced the same error.

vcgaomsft_1-1726216229243.png

Works fine when using other fabric api's that support service principal authentication.

vcgaomsft_0-1726216036567.png

I can also get the token, which seems to be a problem with this API. Additionally, I tested calling this API using Fabric administrator authentication, which was able to return results, which could be a workaround.

 

I'll report this to the product group, and I'll follow up here with any news.

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Oct Fabric Update Carousel

Fabric Monthly Update - October 2024

Check out the October 2024 Fabric update to learn about new features.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.