Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I just loaded a data in power bi dsktop using postman rest api as below in blank query
actualUrl = "http://*******************?",
options = [Headers =[#"Content-type"="application/json",
#"Authorization"="***************"]],
result = Web.Contents(actualUrl, options)
In desktop, data loaded properly in anonymous connection. But in service it's showing Failed to update data source credentials. Why anonymous connection it's not working in service?
Can you please help me to resolve this
Thanks,
Krithika
Solved! Go to Solution.
Hi @Anonymous ,
Would you please try to select the "skip test connection" option? For more details, please refer to https://kohera.be/blog/power-bi/the-hidden-gems-of-the-function-web-contents/
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi. Sometimes Power Bi Service needs more detail about the url. It needs to understand which part of the URL means what. That is why it is a good practise to split in the correct parameteres. Check this post out showing relative path and query path:
This can help Power Bi to identify the source and credentials.
Hope this helps,
Happy to help!
Eventhough it is not working. Data can be pulled in desktop and still in service can't able to refresh. It's showing refresh error as failed to update data source crendentials. since it's public key doesn't have credentials
Hi @Anonymous ,
Would you please try to chang your anonymous to "basic" connection on power bi desktop and passed the API key as the username (left password blank).
But make sure you get rid of API key in your advanced editor if you did set one.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi v-deddai1-msft,
I tried that, even though it's not working. Actual problem is I am fetching data from postman using public key as header. In Power bi, using web web connector It's working. while refreashing it's asking for update credentials. My question, for public key why I want credentials?. Kindly help me with this..
Regrads,
Krithika
Hi @Anonymous ,
Would you please try to select the "skip test connection" option? For more details, please refer to https://kohera.be/blog/power-bi/the-hidden-gems-of-the-function-web-contents/
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Thanks Dedmon, that has worked wonders for me. Thanks.
Ok let's add the key as headers. Check this example: if your URL is this one "https://swapi.dev/api/people/?search=Skywalker" you can build this:
let
Json_body = Json.FromValue("{ ""first_param"": ""AAAAA"", ""second_param"": ""BBBBBB""}",),
Source = Json.Document(Web.Contents("https://swapi.dev/api/", [
RelativePath="people/",
Query=[search="Skywalker"],
Headers=[
#"Content-Type"="application/json",
Otherparameter"ValueOfParameter"
],
Content=Json_body
]))
in
Source
That is an example with body and headers. Try adding your public key there like in postman.
Regards,
Happy to help!
Can you show the complete error message? In addition, please be sure to have the credentials configurated in the schedule refresh options like this:
You can specify anonymous and sign in without anything else. This is an example of a dataset I have connected exactly like you.
Regards,
Happy to help!
Hi,
I am getting the below error, when I tried in anonymous
Regards,
Krithika
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
60 | |
20 | |
18 | |
18 | |
9 |