Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

File on ShP site as a data source

Hello All,

I have an issue with adding a file from ShP as a source. I tried with "Excel workbook" source and copying the hyperlink, but I keep getting errors. I tried few other options, but they seem to be not suitable for this case.

Could you please advise how to add such file as data source to PowerBI desktop?

Thank you in advance!

 

5 Replies

  • Hi Anonymous ,

     

    In Power Query, use the SharePoint Folder connector. The URL to enter will be something like this:

    https://orgname.sharepoint.com/sites/sitename

     

    You can get this URL easily enough by just navigating to the Home page of your SharePoint site and copying the URL from the browser.

    It's best to start at this highest level as you then get a table with every file within the site that you can potentially import, and you also only have to store this high-level authentication on your gateway, making reusing the connection for other files in other folders much easier in future.

     

    Pete

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you for your reply. I tried this method, but unfortunately, I got the following error:

       

      Could you please advise?

      • BA_Pete's avatar
        BA_Pete
        Super User

         

        It looks like you're trying to use the Web.Contents connector to access SharePoint, which is probably why you're getting a 405 error (due to insufficient permissions to access SharePoint via the Web.Contents connector).

        As per my previous post, you should be using the SharePoint Folder connector with appropriate authentication. It will generate Source code something like this:

        let
            Source =
                SharePoint.Files(
                    "https://YourOrgName.sharepoint.com/sites/YourSiteName",
                    [ApiVersion = 15]
                )
        in
            Source

         

        Pete