Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
I've created a dataset which uses some url's who pointed to some azure ressources like cognitives servives..
The url's using vaiables in M (Power Query)
When I want to configure an automatic refresh for each datasource in the power bi.com service, I cannot using the Authentication Method like oAuth which I use on One Drive etc.
I've only Anonymous, Windows and Basic and this don't work.
Error Message:
Failed to update data source credentials: Hide details
| Activity ID: | 7427e891-dc85-45be-9e2d-926c7fbbf3de |
| Request ID: | 8918e10b-186c-c608-ed58-06fee6a07f64 |
| Status code: | 400 |
| Time: | Wed Jan 08 2020 11:39:39 GMT+0100 (Central European Standard Time) |
| Service version: | 13.0.11747.315 |
| Client version: | 1912.2.031 |
| Cluster URI: | https://wabi-north-europe-redirect.analysis.windows.net/ |
HI @Anonymous,
What connector are you test? Web, file or azure connector? Please share more detail information to help us clarify your senior:
How to Get Your Question Answered Quickly
If you mean file with URL, please refer to the following link to know how to find out the root file URL to get data in power bi:
Use OneDrive for Business links in Power BI Desktop
If you mean web connector, check below link about use web connector with rest API and OAuth mode:
OAuth2 REST API as data source
For azure services, normally they are cloudy datasource and not require a gateway to refresh. Any advanced operation enabled in query table steps? (merge, combine, reference, invoke custom function, mix on-premise Datasource)
Regards,
Xiaoxin Sheng
I've used the web connector in Power BI Desktop. On the Desktop version the import and also the refresh works fine. The error is only on the web version on powerbi.com
Hi @Anonymous,
What data credentials mode are you used on power bi service side? Have you configured data credentials on power bi service side? (please confirm you are using same authorization mode on desktop and service side)
According to error messages, it seems like your request missed some contents some remote servers prevent these requests. Can you please share some sample query formulas that you used in the query editor? (Notice: do mask on sensitive data parts)
Regards,
Xiaoxin Sheng
HI @Anonymous ,
AFAIK, web connector does not support to use OAuth mode on power bi service side.
I guess you haven't finished reading the whole document, right? For that sample code, it already added credentials into query steps('api key' of your account), you only need to use anonymous authorization mode on power bi desktop side. (service side data credentials configure should same as desktop report configured)
You select Anonymous because the Text Analytics service authenticates you using your access key, so Power BI does not need to provide credentials for the HTTP request itself.
Regards,
Xiaoxin Sheng
I added a API Key, if not, the application does not work.
If I use Anonsmous Login, I get a 404 Error when I try to configure the Refresh.
Failed to update data source credentials: Web.Contents failed to get contents from 'https://demopl.cognitiveservices.azure.com/text/analytics/v2.1/keyPhrases' (404): Resource Not FoundHide details
| Activity ID: | 7f3dc5c0-14e3-4b98-81af-d22c37013554 |
| Request ID: | 3f534b84-ddcc-4a09-d9c1-d17fc7c1b095 |
| Status code: | 400 |
| Time: | Tue Jan 14 2020 10:47:20 GMT+0100 (Central European Standard Time) |
| Service version: | 13.0.11747.315 |
| Client version: | 1912.2.031 |
| Cluster URI: | https://wabi-north-europe-redirect.analysis.windows.net/ |
Did it on your side work?
Hi @Anonymous ,
It seems like a common credential level issue, power bi allows you to use 'anonymous' authorization on 'root path' but it does not support to enable it on detail API URL.
You can split your URL with 'root path' and 'relative path' and add 'Relative Path' to your optional parameters to prevent this issue:
(text) => let
apikey = "YOUR_API_KEY_HERE",
endpoint = "https://<your-custom-subdomain>.cognitiveservices.azure.com",
relativePath= "/text/analytics/v2.1/keyPhrases",
jsontext = Text.FromBinary(Json.FromValue(Text.Start(Text.Trim(text), 5000))),
jsonbody = "{ documents: [ { language: ""en"", id: ""0"", text: " & jsontext & " } ] }",
bytesbody = Text.ToBinary(jsonbody),
headers = [#"Ocp-Apim-Subscription-Key" = apikey],
bytesresp = Web.Contents(endpoint, [Headers=headers, Content=bytesbody,RelativePath=relativePath]),
jsonresp = Json.Document(bytesresp),
keyphrases = jsonresp[documents]{0}[keyPhrases]
in keyphrases
Regards,
Xiaoxin Sheng
I've made your suggestion But is doen't work:
Failed to update data source credentials: Web.Contents failed to get contents from 'https://demopl.cognitiveservices.azure.com/' (404): Resource Not FoundHide details
| Activity ID: | fc4066ef-fc38-44ea-9446-224fb091bc6d |
| Request ID: | 94f0f571-bdc3-ff20-7a16-06ff37150a04 |
| Status code: | 400 |
| Time: | Tue Jan 21 2020 15:01:40 GMT+0100 (Central European Standard Time) |
| Service version: | 13.0.11888.332 |
| Client version: | 1912.4.031 |
| Cluster URI: | https://wabi-north-europe-redirect.analysis.windows.net/ |
Hi @Anonymous,
How did you use my sample formula, package it as custom function to invoke or extract and use code into a common query table? If you mean custom function, I'd like to suggest you modify it to a normal query table. (dynamic functions seems still not works on power bi service side)
Regards,
Xiaoxin Sheng
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
| User | Count |
|---|---|
| 45 | |
| 44 | |
| 39 | |
| 15 | |
| 15 |