I have created a flow to get the bearer token and using that to get the list of users with their roles in the workspace.
Using the below via get method in the http call
https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/users
I have validated the workspace ID and that is correct not sure why am getting the error as no pbi entity found.
Thanks for your time and this fixed my issue and now I tried with getgroupasadmin and it worked and hence now I do not need to add the service principal to the individual workspace.
Thanks again and I have marked this as a solution.
Hi , @Sabarikarthy
Thanks for your quick response and sorry for my delay response!
I test it in my side , I can reproduce your problem on my side:
The reason for this error is because of the permission of the token you generated, and I guess you are using the Service Principal to obtain the token. You need to add this application to your workspace as a viewer or other role.
And then you can get the return successfully in this https request.
And this is my api to generate the Token by Service principal:
Url: https://login.microsoftonline.com/{tenantID}/oauth2/v2.0/token
scope:https://analysis.windows.net/powerbi/api/.default
client_id: {Your client_id}
client_secret: {Your client_secret}
grant_type:client_credentials
And this is the get the workspace users https request:
Best Regards,
Yueyun Zhang
Thanks for your response.
When I test by clicking on try it option as you suggested, am getting the desired result but when I try it out in the power automate am getting no pbi entity found.
Mentioned permissions were already added to the api permission sections.
Hi , @Sabarikarthy
According to your description, you are call the Power BI Rest API in Power Automate but you get the error as no pbi entity found.
First , we need to check if you can run successfully in the official document "Try it ":
Groups - Get Group Users - REST API (Power BI Power BI REST APIs) | Microsoft Learn
If this fails, you need to check if you have the corresponding permissions, or if you have obtained the correct workspaceid. The Workspace ID is here in he url:(If you're still reporting an error here, you may need to contact the appropriate Power BI technical support)
If you succeed here, but Power Automate still fails, you need to check that your token is getting it correctly.
Test method: Use the Postman tool to test your Power BI Rest API and use the token you generated to test whether the API can be successfully called.
And also you need to check if your token has the Workspace.Read.All or Workspace.ReadWrite.All permission.
And i test it in my side , i works good like this:
If your call to the Power BI Rest API in Postman also fails, then you may want to consult the relevant Power BI technical support to check if your token permissions are insufficient.
Best Regards,
Yueyun Zhang
rpersad
16
David_MA
10
Super User 2025 Season 1
Michael E. Gernaey
8
Super User 2025 Season 1