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.
Hello,
I am using the Power Bi Api to try and create a new workspace v2 (https://docs.microsoft.com/en-us/rest/api/power-bi/groups/creategroup#example-creating-a-workspace-v...). But when i try and do this i get an error http 500.
What i am doing is the following:
I do a http post call to https://api.powerbi.com/v1.0/myorg/groups?workspaceV2=true with in de body of the call this:
{ "name": "test" }
but it always returns a http 500 error code
with this as result
48 { "error":{ "code":"","message":"An error has occurred." } } 0
The app registration that i use to make the call has all the permissions needed to create a workspace. And the app registration also seems to work because other calls do work correctly.
What is wrong with the call and how can i debug this issue ?
Hi @narayanadvl ,
I would use the PowerBIClient to make the API call a little easier. The PowerBIClient is in the Microsoft.PowerBI.Api namespace. The following code works for me as long as you have a valid PowerBIClient.
Maybe I should at the fact that i am using the Service Principal way to connect to the api. So i created and App Registration in Azure with the appropriate permissions. And I added the Service Principal account to the group of users that can use the Power Bi Api. And all other calls are being handled correctly so for example i have created a Workspace by hand and when I import the pbix via the api and set paramaters etc. This all works like a charm. Only creating workspaces via the Api is not working. Has anybody any information of what i am missing here ?
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.
User | Count |
---|---|
12 | |
2 | |
1 | |
1 | |
1 |
User | Count |
---|---|
23 | |
3 | |
2 | |
2 | |
2 |