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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
kobia10
Microsoft Employee
Microsoft Employee

Web connector in powerapp dataflow returns error in refresh, but works well in design

I am connecting anonymously to a web site using the Web connector. (using Basic authentication - I have API Id and secrect to use as user and pwd - and providing these via the optional Options parameter of the Web connector)

When designing in the UX all works fine and  I can see data (it does not ask for credentials).

However, when refershing the power apps dataflow I get the error "The dataflow could not be refreshed because there was a problem with the data sources credentials or configuration. Please update the connection credentials and configuration and try again. Data sources"

1 ACCEPTED SOLUTION

That's tricky. I have not tested this outside of pbi service but may be worth a shot. It may not be possible with your data source, but if you specify the same query parameters in the first argument of Web.Contents as the query parameters you specify in the Query record of the optional record second argument, then you can trick the test connection that the service runs.

 

Also described in a Chris Webb post: https://blog.crossjoin.co.uk/2016/08/23/web-contents-m-functions-and-dataset-refresh-errors-in-power...

 

Relevant excerpt:

 

This technique will only work if the url passed to the first parameter of Web.Contents() is valid in itself, is accessible and does not return an error. But what if it isn’t? Luckily there’s another trick you can play: when you specify the Query option it can override parts of the url supplied in the first parameter. For example, take the following expression:

 

Web.Contents(
 "https://data.gov.uk/api/3/action/package_search?q=apples",
 [Query=[q="oranges"]]
)

 

When static analysis is carried out before dataset refresh, the url

 

https://data.gov.uk/api/3/action/package_search?q=apples

 

..is evaluated. However when the dataset is actually refreshed, the search term in the Query option overrides the search term in the base url, so that the call to the web service that is actually made and whose data is used by the query is:

 

https://data.gov.uk/api/3/action/package_search?q=oranges

 

This means you can specify a base url that isn’t really just a base url just so that static analysis succeeds, and then use the Query option to construct the url you really want to use.

View solution in original post

7 REPLIES 7
v-pgoloju
Community Support
Community Support

Hi @kobia10,

 

 

Thanks for reaching out to the Microsoft Fabric Forum Community.

 

If the issue still persists, I’d recommend raising a support ticket with Microsoft. The support team can look into the backend and provide more in-depth assistance tailored to your environment.


https://learn.microsoft.com/en-us/power-bi/support/create-support-ticket


If this helped, please mark the response as the accepted solution and give it a thumbs-up so others can benefit too.

Best regards,
Prasanna Kumar

 

MarkLaf
Memorable Member
Memorable Member

Without any more details, I'd guess that you can fix this by going to pbi.com and checking "Skip test connection" in Settings > Data Source Settings > [Data Source] > Edit Credentials.

 

Discussed further here: https://blog.crossjoin.co.uk/2019/04/25/skip-test-connection-power-bi-refresh-failures/

kobia10
Microsoft Employee
Microsoft Employee

Hi, I am using PowerApps dataflow where I dont have an option of skipping connection test

That's tricky. I have not tested this outside of pbi service but may be worth a shot. It may not be possible with your data source, but if you specify the same query parameters in the first argument of Web.Contents as the query parameters you specify in the Query record of the optional record second argument, then you can trick the test connection that the service runs.

 

Also described in a Chris Webb post: https://blog.crossjoin.co.uk/2016/08/23/web-contents-m-functions-and-dataset-refresh-errors-in-power...

 

Relevant excerpt:

 

This technique will only work if the url passed to the first parameter of Web.Contents() is valid in itself, is accessible and does not return an error. But what if it isn’t? Luckily there’s another trick you can play: when you specify the Query option it can override parts of the url supplied in the first parameter. For example, take the following expression:

 

Web.Contents(
 "https://data.gov.uk/api/3/action/package_search?q=apples",
 [Query=[q="oranges"]]
)

 

When static analysis is carried out before dataset refresh, the url

 

https://data.gov.uk/api/3/action/package_search?q=apples

 

..is evaluated. However when the dataset is actually refreshed, the search term in the Query option overrides the search term in the base url, so that the call to the web service that is actually made and whose data is used by the query is:

 

https://data.gov.uk/api/3/action/package_search?q=oranges

 

This means you can specify a base url that isn’t really just a base url just so that static analysis succeeds, and then use the Query option to construct the url you really want to use.

Akash_Varuna
Community Champion
Community Champion

Hi @kobia10 Try re-entering the API credentials in the Dataflow’s Data Source Settings to ensure they match during both design and refresh and verify that the authentication method (Basic Auth) is correctly set up for both design and refresh also check for any network and service related issue it might be because of that also

In the connection settings I dont have a place to enter the additional credentials info. Either Anonymous (with no additional params) and. Org account 

kobia10_1-1746516658861.png

 

 

Hi @kobia10,

 

Thank you for reaching out to the Microsoft Fabric Forum Community.

 

Here are the alternative methods:

Use Power BI Dataflows
Switching to Power BI Dataflows allows greater flexibility when connecting to authenticated web APIs. Power BI supports Basic Authentication, allows custom headers in Web.Contents, and offers the "Skip test connection" feature none of which are available in Power Apps Dataflows. This ensures your API credentials are handled securely and the dataflow can refresh successfully. Once the data is ingested, you can export it to Dataverse or make it available to Power Apps through a shared dataset or connected table.

 

Create a Custom Connector
If you need to stay within Power Apps and use the API regularly, creating a Custom Connector is a robust solution. It lets you securely define authentication (e.g., Basic, OAuth2), manage headers, and reuse the connector across apps and Power Automate flows. This approach is ideal for integrating secure APIs directly without relying on workarounds or intermediate services, and ensures consistent behavior across the Power Platform.

 

If you find this response helpful, please consider marking it as the accepted solution and giving it a thumbs-up to support others in the community.


Thank you & Regards,
Prasanna Kumar

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors