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
tbush
Frequent Visitor

Power BI Gateway unable to connect to Excel workbook saved on SharePoint Online

Hi,

 

I can't set up an Excel Workbook saved on SharePoint Online as a data source with the Power BI Gateway:

 

M# code:

let
    Source = Excel.Workbook(Web.Contents("https://TENANTNAME.sharepoint.com/sites/path/to/workbook/WORKBOOKNAME.xlsx"), null, true),

 

This works fine in Power BI desktop.

However I can't pick Oath2 authentication in the Gateway setup for a Web data source. When trying with Windows Authentication instead I get the following error:

 

 

Status code:	400
Error Code:	DM_GWPipeline_Gateway_InvalidConnectionCredentials
The credentials provided for the Web source are invalid. 

 

 

When will Oath2 authentication be addded to the Gateway Web data source? Or, is there another way of consuming the workbook hosted on SharePoint?

2 ACCEPTED SOLUTIONS

Hi @tbush,


It seems like we are in the wrong direction, Excel files in Sharepoint Online not need to use gateway to refresh.

 

You can use the "connect directly" mode to link the file and modify the credentials to enable the refresh.(Setting -> Datasets)

 

Capture.PNGCapture2.PNG

 

If you want to know more about power bi data refresh, you can take a look at below article:

 

Data sources for Power BI service

Data refresh in Power BI

 

Regards,

Xiaoxin Sheng

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

View solution in original post

Thank you for the reply, my use case involves mashing up this Excel workbook with on premesis data from SQL Server in the same data model.

 

So we are buggered and can't use the enterprise gateway at the moment because this feature is not supported. I have voted for it to be added.

View solution in original post

5 REPLIES 5
v-shex-msft
Community Support
Community Support

Hi @tbush,

 

You can try to use SharePoint.Files function to get the datasource:

 

let
    Source = SharePoint.Files(https://TENANTNAME.sharepoint.com/sites/path/to/workbook/WORKBOOKNAME.xlsx")

 

Regards,

Xiaoxin Sheng

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

Hi Xiaoxin,

 

I changed my query to use SharePoint.Files and I now have the option for oath authentication in the Power BI Gateways > Add Data Source screen.

 

However I'm now getting the following error:

 

Unable to connect: We encountered an error while trying to connect to https://COMPANY.sharepoint.com/. Details: "We reached the data gateway, but the gateway can't access the on-premises data source."Hide details

Activity ID:a48ad216-9baf-4894-b063-b717992b09c9
Request ID:751c37a1-1b3f-a0ef-dc2b-173a814324da
Cluster URI:https://wabi-australia-southeast-redirect.analysis.windows.net
Status code:400
Error Code:DM_GWPipeline_Gateway_DataSourceAccessError
Time:Mon Jan 23 2017 10:04:48 GMT+1300 (New Zealand Daylight Time)
Version:13.0.1700.1015

Hi @tbush,


It seems like we are in the wrong direction, Excel files in Sharepoint Online not need to use gateway to refresh.

 

You can use the "connect directly" mode to link the file and modify the credentials to enable the refresh.(Setting -> Datasets)

 

Capture.PNGCapture2.PNG

 

If you want to know more about power bi data refresh, you can take a look at below article:

 

Data sources for Power BI service

Data refresh in Power BI

 

Regards,

Xiaoxin Sheng

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

Thank you for the reply, my use case involves mashing up this Excel workbook with on premesis data from SQL Server in the same data model.

 

So we are buggered and can't use the enterprise gateway at the moment because this feature is not supported. I have voted for it to be added.

jodur
Frequent Visitor

I have the same issue. In my model (Dataset) i use a combination of data from our Firebird SQL server and a excel file that is stored in on a sharepoint site. In this use case we are not able to use the combination. The only solution for now that works, is to store the excel file on our local network.

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