Forum Discussion
can't get workspaceid
Hi,
When i am accessing(https://api.powerbi.com/v1.0/collections/indriynpoerbiapp/workspaces) url with Authorization AppKey , always i am getting 403 Forbidden error, so please any body help me how to get workspace id
Regards,
KotiReddy.
Per the documentation and my test, the correct URL to request the workspaces is as below.
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/workspaces?api-version=2016-01-29And the authorization is still using an token, you can check the function GetWorkspaceCollectionMetadata in power-bi-embedded-integrate-report-into-web-app.
3 Replies
- Eric_ZhangMicrosoft Employee
Per the documentation and my test, the correct URL to request the workspaces is as below.
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/workspaces?api-version=2016-01-29And the authorization is still using an token, you can check the function GetWorkspaceCollectionMetadata in power-bi-embedded-integrate-report-into-web-app.
- KotiReddyNew Member
Hi v-ivzhan-msft thank you for giving me response, can you please send me exact url for getting workspace id, already i saw this url( /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/workspaces?api-version=2016-01-29), but i don't know the hostname(like https://api.powerbi.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/workspaces?api-version=2016-01-29) for starting of this url
- Eric_ZhangMicrosoft Employee
The host name is "https://management.azure.com".