Forum Discussion

baraco's avatar
baraco
New Member
2 years ago
Solved

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.
 
 
 
  • Anonymous's avatar
    Anonymous
    2 years ago

    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.

     

    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.

     

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

    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.

    And please enable the Service principals can use Fabric APIs.

    3. Finally add the security group to Workspace:

     

    Test api works fine:

    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

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi baraco ,

     

    I reproduced the same error.

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

    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

  • Anonymous's avatar
    Anonymous
    Not applicable

    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.

     

    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.

     

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

    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.

    And please enable the Service principals can use Fabric APIs.

    3. Finally add the security group to Workspace:

     

    Test api works fine:

    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