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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
hildebolt
Advocate I
Advocate I

Aut. Refresh in PowerBI Service failing: "The Credentials provided for the Web source are invalid"

I have set up a dashboard in Power BI Desktop that uses a combination of PostgreSQL data and data pulled from a graphql in the header. I configured the call myself in a blank query, and it reads as follows: 

 

let
url = "https://my-website.com/graphql",
token = "express:sess=ey[replaced with Cookie]",
body = "{ ""query"": ""query allCaseParameterFilter($filter: [FilterInput]) { allCaseParameterFilter(filter: $filter) { caseParameterIdentifier name } }"", ""variables"": {""filter"": []} }",
response = Web.Contents(
url,
[
Headers=[
#"Method"="POST",
#"Content-Type" = "application/json",
#"Cookie"=token
],
Content=Text.ToBinary(body)
]
),

jsonResponse = Json.Document(response)

in
jsonResponse

This works perfectly well in PowerBI Desktop. However, when I upload to PowerBI Service, I am having issues setting up the automatic refresh. I receive an error message for the Web connection that states "The credentials provided for the Web source are invalid."

 

Does anyone know what might be causing this issue?

5 REPLIES 5
ImpactBIGuy
Regular Visitor

I have the same issue. Has anyone been able to resolve this? I have set to Anonymous level and have a token that is dynamically generated via a GraphQL query

Anonymous
Not applicable

Hi   @hildebolt 

I've met this issue before, please check these following points:
Have you add all the credentials of your semantic model(PostgreSQL and graphql), make sure that these credentials are valid and accessible to the currently logged-in service user.

 

Here is the link of how to add GraphQL credentials in Power BI service:

Visualize Live GraphQL Data in the Power BI Service (cdata.com)

Links about how to add PostgreSQL credentials in Power BI Service:

Solved: Re: Failed to update data source credentials for p... - Microsoft Fabric Community

Visualize Live PostgreSQL Data in the Power BI Service (cdata.com)

 

Best Regards

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

Hi zhengdxu - many thanks for the response!

When you refer to the credentials, are you referring to the credentials that are entered here? 

hildebolt_0-1710928250055.png

If so, then I have successfully ,configured the log-in details for SQL, but cannot get the graphql call to work. 

I will look into the link you sent about adding GraphQL credentials, thanks! One quick question in reference to that - in the instructions it says that you should set the connection as a DirectQuery.. is this a must, as I would rather need to import the data so I can configure it. 

Thanks again for your help. 

GilbertQ
Super User
Super User

Hi @hildebolt 

 

When you set up the data source credentials for your web source, have you configured it to use Anonymous authentication?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Hi GilbertQ - thanks a lot for the response! Yes, I set the credentials to Anonymous in the Desktop version of the dashboard, which worked, and I have tried to do the same (with the data protection level set to Organizational) in the Service version.. No luck, unfortunately. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.