Forum Discussion
Dynamic query with next page key parameter from API - How to adapt code for Power BI service?
- 1 year ago
In the end, I solved my problem using a python script to import the data and write them in excel files.
Kind regards
Marta
Hi PowerBI88,
Did you get a chance to implement the solution? if everything was good, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
- PowerBI881 year agoResolver I
I tried implementing the solution but I am not able to make it work.
Kind regards
Marta- v-priyankata1 year agoCommunity Support
Hi PowerBI88
Thank you for reaching out to the Microsoft Fabric Forum Community.
Can you please try below points.-
The issue is happening because you're passing things like the URL and API token into the function as parameters, and Power BI sees that as dynamic.
-
Power BI Service doesn’t allow queries that build the URL at runtime—it blocks them for security reasons.
-
To fix it, just put the full URL and token directly inside the web.contents call instead of using variables or building them with &.
-
Basically, avoid making the request dynamic—keep it simple and static so Power BI can recognize and approve it during refresh.
-
Once that’s done, the refresh should work fine in the Power BI Service.
If this information is helpful, please “Accept as solution” to assist other community members in resolving similar issues more efficiently.
Thank you. -