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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jstearnes
Helper I
Helper I

GET workspaces

I am developing a REST API and I need to retrieve a list of workspaces but I cannot find such a resource in the documentation - https://msdn.microsoft.com/en-us/library/mt147898.aspx. I have, however, seen a workspaces resource documented in the embedded API - https://msdn.microsoft.com/en-us/library/azure/mt711496.aspx, this resource requires a workspaceCollectionName parameter to be supplied, of which I do not know where to retrieve. I am not currently using this API, nor do I understand why there is a separate API to the regular one. Can anyone help?

3 REPLIES 3
v-ljerr-msft
Employee
Employee

Hi @jstearnes,



I am developing a REST API and I need to retrieve a list of workspaces but I cannot find such a resource in the documentation - https://msdn.microsoft.com/en-us/library/mt147898.aspx


You should be able to use the  Get Groups operation returns a JSON list of all groups that the signed in user is a member of. Groups are a collection of unified Azure Active Directory groups that the user is a member of and is available in the Power BI service. These are referred to as app workspaces within the Power BI service.



I have, however, seen a workspaces resource documented in the embedded API - https://msdn.microsoft.com/en-us/library/azure/mt711496.aspx, this resource requires a workspaceCollectionName parameter to be supplied, of which I do not know where to retrieve. I am not currently using this API, nor do I understand why there is a separate API to the regular one. Can anyone help?

The workspace collection name is contained in app token which is used for all embedding requests. And there are methods available within the SDKs that make creation of app tokens easier. For example, for .NET you can look at the Microsoft.PowerBI.Security.PowerBIToken class and the CreateReportEmbedToken methods. For the .NET SDK, you can refer to Scopes. For more details, you can refer to Authenticating and authorizing with Power BI Workspace CollectionsSmiley Happy

 

Regards

Hi @v-ljerr-msft I am using Java and am not using any SDKs. Also, I do not believe that groups are resources because I have one workspace, 'My Workspace', but when I call GET groups an empty collection is returned

Hi @v-ljerr-msft any additional help would be greatly appreciated

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors