I have built a .XLSM (macro-enabled) Excel file that uses standard "Web" method to get data from a .XLSX worksheet saved in my organizational OneDrive for Business/Sharepoint; the file in OneDrive is permissioned to be accessed only by those in Organization. The file is macro-enabled for other purposes, but not for making the data query.
I followed the guidance in the following documentation (from Microsoft) https://docs.microsoft.com/en-us/power-bi/desktop-use-onedrive-business-links
I can then successfully connect to the file and pull down the data in the remote worksheet, but when I share the Excel local file that is making the query with another user in my Organization, they receive an error that the query is not able to be completed.
It appears that Excel is taking the part of my original URL after the Organizational OneDrive domain, and placing it within a relative URL API call.
Here is the error message they receive (I have modified some of the base URL):
[DataSource.Error] Web.Contents failed to get contents from 'https://organization-my.sharepoint.com/personal/username/_api/web/getfilebyserverrelativeurl('/personal/username/Documents/foo/bar/test_file.xlsx')/$value' (404): Not Found
I don't see this URL or the getfilebyserverrelativeurl function at all in my own version of the file (I'm logged in to the local Excel as the same user that owns the OneDrive account hosting the remote file) - what is Excel/OneDrive doing when it is trying to be accessed by other users who are permissioned to access the file through the Organization? Is there some setting I need to change in the file?