Forum Discussion

cmncp's avatar
cmncp
Helper III
9 years ago
Solved

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?
  • Anonymous's avatar
    Anonymous
    9 years ago

    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

17 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    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.


    Thanks,
    Lydia Zhang

    • cmncp's avatar
      cmncp
      Helper III

      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'."

       

    • Tom_Y's avatar
      Tom_Y
      Advocate II

      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,

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

  • Anonymous's avatar
    Anonymous
    Not applicable

    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?