cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
musa Frequent Visitor
Frequent Visitor

Power BI not saving basic authentication credentials during scheduling

Hi, 

 

I can refresh manually on desktop, but when scheduling a refresh on the cloud I keep getting this error:

'WebContents failed to get contents'

 

Checking the 'Data Source Credentials' shows that 'Anonymous' method is being saved, even though I have it set to 'basic' with username and password on the Desktop version. I can input my credentials by selecing 'Basic' (username and password), but the next time the job is scheduled to run and refresh the app doesn't save my credentials causing this error again.

 

Any help is much appreciated.

 2018-02-15_11-11-41.png2018-02-15_11-11-28.png

 

6 REPLIES 6
Highlighted
musa Frequent Visitor
Frequent Visitor

Authentication defaults to anonymous. Basic credentials not saved during scheduling

Hi, I am experiencing an issue where a report created on desktop works and refreshes but when published to the cloud I receive this error when trying to schedule:

 

Webcontents failed to get contents.

 

When I check the dialog box for credentials, 'Anonymous' is selected. I switch it to 'Basic' and include username and password but when I exit the window and check back it defaults to anonymous.

 

Any help is much appreciated. 

 

2018-02-15_11-11-41.png2018-02-15_11-11-28.png

Community Support Team
Community Support Team

Re: Authentication defaults to anonymous. Basic credentials not saved during scheduling

HI @musa,

 

>>When I check the dialog box for credentials, 'Anonymous' is selected. I switch it to 'Basic' and include username and password but when I exit the window and check back it defaults to anonymous.

Current power bi service authentication mode will located at anonymous even if you succeed sign in with other credential.

 

According to your erreor message, it seems not related to credential, please refer to below link to know more about this.

400 Bad Request Error: What It Is and How to Fix It

 

In addition, did you use custom functions or query parameters in power query? If this is a case ,current query parameter and custom function not support on power bi service.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |
CZ Frequent Visitor
Frequent Visitor

Re: Power BI not saving basic authentication credentials during scheduling

I have this exact issue as well.

CZ Frequent Visitor
Frequent Visitor

Re: Power BI not saving basic authentication credentials during scheduling

I think it's worth sharing that I just created a simple app to force updates using the PowerBI API as a workaround to this issue.  As a bonus it allows up to 8 updates per day for PowerBI Pro users (and 48 I believe for Enterprise-level subscriptions).

 

Details on the API and the specific refresh endpoint are here:

https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/refreshdataset

 

or for datasets in groups:

https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/refreshdatasetingroup

jackwaayer Frequent Visitor
Frequent Visitor

Re: Power BI not saving basic authentication credentials during scheduling

I think I was having the same issue you had here. My fix was very straight forward.

I went into Power BI desktop, editted the query for getting the data from the API to - Json.Document(Web.Contents("url"))

(No authorization headers included)

Set my credentials to Basic Auth and entered the credentials.

Saved and published the report up to the cloud.

 

When in the cloud version, I went to my dataset's settings and checked the "Data Source Credentials" to make sure everything was working.

Sure enough, I was faced with:

Your data source can't be refreshed because the credentials are invalid. Please update your credentials and try again.

BUT, there was a little spinning/loading thing next to the edit credentials link.

I decided to give it some time to see what would happen and boom!

Once it had loaded, the error went away and I could now set up my Scheduled Refresh.

 

Seems like the auth defaults to Anonymous until your basic auth has made the connection (seems to take a while the first time).

 

Not sure if this will help you but thought I'd post it anyway!

 

 

 

jackwaayer Frequent Visitor
Frequent Visitor

Re: Power BI not saving basic authentication credentials during scheduling

I think I was having the same issue you had here. My fix was very straight forward.

I went into Power BI desktop, editted the query for getting the data from the API to - Json.Document(Web.Contents("url"))

(No authorization headers included)

Set my credentials to Basic Auth and entered the credentials.

Saved and published the report up to the cloud.

 

When in the cloud version, I went to my dataset's settings and checked the "Data Source Credentials" to make sure everything was working.

Sure enough, I was faced with:

Your data source can't be refreshed because the credentials are invalid. Please update your credentials and try again.

BUT, there was a little spinning/loading thing next to the edit credentials link.

I decided to give it some time to see what would happen and boom!

Once it had loaded, the error went away and I could now set up my Scheduled Refresh.

 

Seems like the auth defaults to Anonymous until your basic auth has made the connection (seems to take a while the first time).

 

Not sure if this will help you but thought I'd post it anyway!

 

 

 

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 365 members 3,927 guests
Please welcome our newest community members: