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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.