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

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.

Reply
cmncp
Helper III
Helper III

Excel Sharepoint Data Refresh - Can't refresh your data

I have an excel file in Sharepoint Online, which has a simple table of data.  Using Power BI Desktop, I can connect to it and create a report.  After I publish the report to Power BI Service, I can see the report, and it all looks good.  However, as soon as I try to refresh the Dataset, I get the following error:

 

Can't refresh your data
 
The credentials you provided for the data source are invalid. Please check the credentials for all the data sources.
Please try again later or contact support. If you contact support, please provide these details.
 
When I close the message, it takes me to the Settings page for the dataset and the Data source credentials section.  It says:
 
Your data source can't be refreshed because the credentials are invalid. Please update your credentials and try again.
 
When I click on Edit Credentials, the only Authentication method available is "WindowsWithoutImpersonation".  When I click Sign In, it just sits there spinning and never comes back.
 
Any ideas what I am doing wrong?
1 ACCEPTED SOLUTION

Hi @cmncp,

Firstly, for excel located in on-premises SharePoint site, we need to use Windows authenticaion. For Excel located in SharePoint Online, we need to use OAuth2 authentication.

Secondly, to access on-premises data source, gateway is required when refreshing dataset. And both personal gateway and on-premises gateway require Pro.

Thanks,
Lydia Zhang

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

View solution in original post

17 REPLIES 17
EV
Advocate II
Advocate II

Similar issue, my file has data from tabular model and 2 sheets of plain table data.

 

Created excel file with 2 sheets of plain table data and 3 sheets with pivot table connecting to tabular model(external data connection). developed Power Bi report off of this file.

 

This file is saved in sharepoint site but need help to understand how this file can be refreshed automatically including the data refresh, so that power bi displays latest data.

 

has anyone come across this issue? 

ALRUYOYO
Advocate I
Advocate I

Hi,

I have the same issue. Created a report connecting to sharepoint, published and now I can't refresh because it never signs in.
error BI.JPG

v-yuezhe-msft
Employee
Employee

Hi @cmncp,

I am not able to reproduce your issue. How do you connect to the Excel file in Power BI Desktop, via “Get Data->Web” entry?


When you connect to the Excel file, please choose Organizational account type in Power BI Desktop, once you publish the  Power BI Desktop file to Power BI Service, go to Settings for your dataset, then check if you get OAuth2 authentication method under Data source credentials section.

1.PNG


Thanks,
Lydia Zhang

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

You are right! OAuth2 is the answer for Get Data --> Web and credentials fail in Power BI Services!!!! Thanks x 10000.

Spent 10 hours and finally find the answer here. Please spread the message so more people can be saved.

Hi Lydia.

 

Thanks for the reply.  I was using Get Data > Excel, not Get Data > Web. 

 

When I use the Web option, and then choose OAuth2, it works when my file is in One Drive for Business, but not when it is in Sharepoint Online, which is the requirement.

 

When trying to connect to Sharepoint Online, I do the following:

- Get Data > Web

- Enter the URL of the excel file (minus the ?Web=1 querystring)

- I then choose Organizational Account and click Sign In.  I get the following error:

 

"The WWW-Authenticate header doesn't contain a valiud authorization URI.  Header value: 'NTLM'."

 

Hi @cmncp,

Enter URL using format like: https://XXXXX.sharepoint.com/sites/XXXX/Shared%20Documents/excelname.xlsx .


Thanks,
Lydia Zhang

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

I discovered that my issue was that the Sharepoint installation was actually on premise, not online.

Hi @cmncp,

Please follow the guide in this similar thread to connect to Excel file located at on-premises SharePoint from Power BI Desktop. After you publish Power BI Desktop to Power BI Service, you would need to add the excel data source under on-premises gateway in order to refresh the dataset.

Thanks,
Lydia Zhang

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

Sorry for the late reply.  When I use this method, I am still unable to refresh the data.  See the error message below.  The only options in authentication method are Anonymous and Windows.

2017-02-02_11-13-53.png

Hi @cmncp,

In Power BI Desktop, you should use Windows authentication to connect to Excel file located at on-premises SharePoint Site. And when you refresh dataset in Power BI Service, you should use Windows authentication as well.

Thanks,
Lydia Zhang

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

Hi @v-yuezhe-msft

 

This is what I am doing.  I get the error message shown above when I am in the Power BI web service, trying to edit the connection details.  I choose Windows Auth, click sign in, and get that error.

 

Chris

Hi @cmncp,

Are you able to use on-premises gateway to refresh your dataset?

Thanks,
Lydia Zhang

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

@v-yuezhe-msft,

 

I didn't know you could do that!  2 questions

 

  1. Should I use Windows or OAuth2 athentication?
  2. Is it possible to set it up without using the gateway?  Using the gateway means we have to go on the PRO license.

Hi @cmncp,

Firstly, for excel located in on-premises SharePoint site, we need to use Windows authenticaion. For Excel located in SharePoint Online, we need to use OAuth2 authentication.

Secondly, to access on-premises data source, gateway is required when refreshing dataset. And both personal gateway and on-premises gateway require Pro.

Thanks,
Lydia Zhang

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

Hi @v-yuezhe-msft

 

Now that I am trying to configure this is production, I am having more problems.  Using a test folder I got this working ok.  But now trying to connect to a different folder, it is not working.

 

A folder has been created in a Sharepoint Library, and I have uploaded my spreadsheet into it.  I can point my data connection in PowerBI Desktop to it and it refreshes.  I am now trying to add a new connection to the Power BI Gateway.  

 

The sharepoint (on prem) URL is "https://<site>.<company>.com/function/ZZBS/ZZBSAPAC/DH/DRMHR"  I think "DH" is the site, and "DRMHR" is the library.  There is a folder within the library that contains my files.

 

If I try and add a new gateway datasource and use the full URL "https://<site>.<company>.com/function/ZZBS/ZZBSAPAC/DH/DRMHR", I get the error "SharePoint: Request failed: The remote server returned an error: (400) Bad Request.".

 

If I use the URL "https://<site>.<company>.com/function/ZZBS/ZZBSAPAC/DH", it works ok. However when I publish my Power BI report, it does not allow me to "Use a data gateway".  The option is grayed out.  It is like it is not recognizing that the connections are the same.

 

2017-02-03_16-27-48.png

 

Please help!

For anyone who has the same problem, this issue was resolved by selecting "Web" rather than "Sharepoint" when adding the new datasource to ther gateway.

I have a similar issue.  I have a Power BI file that is using  Excel file on Sharepoint  as data souces. When I refresh the dataset from Power BI desktop, it goes through without any problem but the refresh for the file published on the Power BI service fails with "Edit Credentials" message. 

 

what is happening? 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors