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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Prabha45
Helper III
Helper III

Refresh and data source credentials disabled

Hi,
I connected to a  web API with a login and password using basic authentication, refresh works fine in desktop, but in service it throws an error.
I tried this "In PowerQuery ("Transform data" when you connect to the Web Page in Power BI desktop) Change the "source" line, often the first line of the Power Query steps, from " = Web.BrowserContents("**your URL **")" to " = Web.Contents("**your URL **")".
But still data source credentials are disabled. Installing a gateway is the only option ?

Thanks

1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi ,  @Prabha45 

Based on my previous test and research on the M script function you are using for the dataset transformation, usually if you use the M function "Web.Contents("**your URL **")"" in the M script function you are using for the dataset transformation, the credential edit page will not allow you to use any credential and said it can only support the "Anyonmous" authorization method, so my best suggestion is that you may try to add the authorization or token (like the account and password) into the request header of your API URL you try to connect to, like this:

 

vyueyunzhmsft_1-1692583293199.png

What's more, here's one useful blog like you may also refer to that create a Power BI Custom Connector For The Power BI REST API, can also be a possible solution:

https://blog.crossjoin.co.uk/2018/11/13/openapi-power-bi-rest-api-m/

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

 

 

 

 

 

View solution in original post

1 REPLY 1
v-yueyunzh-msft
Community Support
Community Support

Hi ,  @Prabha45 

Based on my previous test and research on the M script function you are using for the dataset transformation, usually if you use the M function "Web.Contents("**your URL **")"" in the M script function you are using for the dataset transformation, the credential edit page will not allow you to use any credential and said it can only support the "Anyonmous" authorization method, so my best suggestion is that you may try to add the authorization or token (like the account and password) into the request header of your API URL you try to connect to, like this:

 

vyueyunzhmsft_1-1692583293199.png

What's more, here's one useful blog like you may also refer to that create a Power BI Custom Connector For The Power BI REST API, can also be a possible solution:

https://blog.crossjoin.co.uk/2018/11/13/openapi-power-bi-rest-api-m/

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

 

 

 

 

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Kudoed Authors