Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Sm0707
Regular Visitor

Power BI Admin API working in Desktop but in service unable to refresh datasets

Hello, I am trying to make a report for all the worksapces and reports using Power Bi Admin API.

 

I am able to refresh datasets in desktop but when i published the report in service i am not able to configure it.

URL Used - https://api.powerbi.com/v1.0/myorg/admin/groups?$top=1000&$expand=datasets

Admin rpt 2.jpg

 

5 REPLIES 5
Sm0707
Regular Visitor

Just to add-

I am using a function to get the jwt token then invoking the function in the other data source.

 

Sm0707_1-1684403973501.pngSm0707_2-1684404046931.png

Could it be the second data source isn't able to get the JWT token from function, causing the auth problem? 

Sm0707
Regular Visitor

If you are talking about this then it would still be the same URL in the datasource so it is still not resolving the issue.

Sm0707_0-1684399869666.png

 

ibarrau
Super User
Super User

Hi! I think I have seen this before. Did you tried skipping test? The thing with APIs when you are doing the auth in headers with token is that is difficult for service to capture and understand the anonymous. Try skip, I have seen that working in another post. They where using relative path leaving a smaller url, but I think it should work anyway.

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Yes, skip test was my first choice.

As I have a function which is getting the JWT and then passing on to the query where this dataset is being used. So, I did that at first then when that didn't work I tried all other auth options but nothing could get it resolved.

 

Also just to mention it worked 7-8 months ago for a different client, having a feeling something may have changed which is not part of the MS documentation.

Ok. Then you might want to try using relative path for the Web.Contents keeping the URL for just "https://api.powerbi.com/" . The rest of the url would be the relative path. Let's see if that way PowerBi Service can read it.

I hope that helps


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.