Excel Power Query Refresh fails for a shared file owner on SharePoint using Office 365 Business Prem

Copper Contributor

I have recently generated several Excel spreadsheets on our office 365 sharepoint drive.  I use Power Query in Excel to manipulate data and generate Pivot reports in the excel spreadsheets.  All references to the excel spreadheets use web links and not local drive directories.  All of the files have been shared with a co-worker.  While the co-worker can sync the files locally to their machine and open the files, they cannot refresh the data.  My co-worker receives the following error: [Exception of type "Microsoft.Mashup.Engine.Interface.ResourceAccessForbiddenException" was thrown].  We are both using our Organization Account credentials to access the data source.  I suspect that this is where the issue is originating, but looking for a workaround, since we both need to access, edit and refresh the excel files and the corresponding power queries.

4 Replies

@SAI-Indy , how exactly do you reference files on SPO? Correct query is like

 

Sharepoint.Files(<root site URL>) 
Filtrer file by name 
Get binary content 
Get object from file (table or sheet)

@Sergei Baklan 

 

Here' the general flow:

1a) SharePoint.Files("https://mydomain.sharepoint.com/sites/Commissions/", [ApiVersion = "Auto"]))

or

1b) SharePoint.Files("https://mydomain.sharepoint.com/sites/Commissions/myfilename.xlsx")

2) Filter files by name (for option 1a above)

3) GetExcelObjects (filter by kind=sheets)

4) Expand tables

5) ...manipulate data

@SAI-Indy , never seen any problems with 1a

 

IMHO, 1b shall not work

@Sergei Baklan 

Is there a generalised step-by-step guide for how to share power query enabled Excel files, without hitting this error, please. I have the same error (with two files and do not understand a) why it's there or b) why some users can refresh, while others cannot or c) what to do to fix it. Any help gratefully received, please.

Thanks,