Forum Discussion
Power BI XMLA refresh single table through Logic App
- Anonymous4 years ago
Hi Anonymous
I think you need to follow the steps in blog as below like adding your service principal into a security group and add this group as a member in API Permission in Power BI Service tenant setting.
For reference:
embedded/embed-service-principal#step-1---create-an-azure-ad-app
In my test I use Post https://login.microsoftonline.com/TenantID/oauth2/token .
And add grant_type(client_credentials) ,Resource( https://analysis.windows.net/powerbi/api) , client_id ,client_secret in request body.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous
Do you want to refresh dataset in Workspace by Rest API? And your authentation method is Service Principal.
You can have a test by "Try it" from this link.
For reference: Datasets - Refresh Dataset In Group
If you can succeed to refresh your dataset in "Try it", there may be something wrong in your authentation.
Try to get access token by Service Principal in Postman. Note : Grant_Type should be client_credentials instead of Password due to you use Service Principal. Resource should be "https://analysis.windows.net/powerbi/api".
For reference: Power BI REST API using postman - generate embed token.
Please check the step of your service principal configuration.
For reference: Method
Pleasec check whether you enable the Power BI Service admin setting and add the security group into it.
Pleasec check whether you add this service principal into the workspace contain the dataset you refresh.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous , thanks for the details. I tried to test with "Try it" and was able to refresh my dataset.
So I tried to the postman way but I see I am getting an below error. As suggested I gave given grant_type as client_credentials and then provided my client_secret. The POST url I used is "https://login.windows.net/common/oauth2/token" and resource as suggested by you.
I tried to read the "Method" link shared by you to understand the process. I am bit confused at the AD security point. does this mean I need to add the Service Principal APP to the AD security group ? what if I organization had enabled option "for entier organization" ? even in that case do I need to have a security grouo created and add this APP in that? can you please elobrate on this point a bit more please? I think the issue is authentication and it is struglling to get access. Once again thanks a lot for your details explanation
- Anonymous4 years agoNot applicable
Hi Anonymous
I think you need to follow the steps in blog as below like adding your service principal into a security group and add this group as a member in API Permission in Power BI Service tenant setting.
For reference:
embedded/embed-service-principal#step-1---create-an-azure-ad-app
In my test I use Post https://login.microsoftonline.com/TenantID/oauth2/token .
And add grant_type(client_credentials) ,Resource( https://analysis.windows.net/powerbi/api) , client_id ,client_secret in request body.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.