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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
efilipe
Helper IV
Helper IV

Some credentials arent validated problem

 

Hi guys,

 

I'm having this problem below. The thing is that all those APIs has almost the same setup. I can't get powerbi to test those conections again. Setting thos ein PowerBI web doesnt work.

 

Any ideas?

 

pw1.png

7 REPLIES 7
v-alq-msft
Community Support
Community Support

Hi, @efilipe 

 

I wonder whether you are using AAD OAuth. The Azure Active Directory (AAD) OAuth token, used by many different data sources, expires in approximately one hour. You can run into situations where loading data takes longer than the token expiration (more than one hour), since the Power BI service waits for up to two hours when loading data. In that situation, the data loading process can fail with a credentials error. If you have a Web connector script that's using the Web.Page function, and you have updated your dataset or report after November 18th, 2016, you must use a gateway for refresh to work properly.

 

For further information, please refer to the official document .

 

Best Regards

Allan

 

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

Hello,

 

This is how I call the API:

 

let
Source = Json.Document(Web.Contents("https://[URL o the site]/api-public/report/query/50", [Headers=[#"X-API-Key"="1234567890"]]), 65001),
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error)
in
#"Converted to Table"

 

 

pw2.png

I'm calling all the API in the same way, but a few I skipped the "Test" and now I have this error that I can't fix, it seems.

 

When I try to update the credention of those with a problem, I get:

 

Failed to update data source credentials: Web.Contents failed to get contents from 'https://[SITE URL]/api-public/report/query/58' (400): Hide details

What I noticed is that all of the API that are ok has a "private Level Setting" selected.

 

pw3.png

 

The one that has a problem is missing that setup. I can choose any and I get the 400 error.

Hi @efilipe 

 

Can you try my below answer

 

https://community.powerbi.com/t5/Developer/Dataset-not-refreshing-via-API-in-Power-BI-web-service-am...

 

Basically you are using X-key for the autentication to the API which is currently not a possible for Web Connector. so you can follow my workaround mentioned in the above link

@Jayendran @v-alq-msft 

 

What is the best way then, since X-Code doesnt work?

 

Thanks!

Jayendran
Solution Sage
Solution Sage

Hi @efilipe ,

 

Could you please provide what is the autentication type ? Is that using OAuth ?

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors