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.
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?
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 Collections.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.