The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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?
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
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?
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.
Hi @hildebolt
When you set up the data source credentials for your web source, have you configured it to use Anonymous authentication?
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.