Forum Discussion
Which URL for a data flow connection to a SharePoint Folder?
I'm trying to create a data flow in Power BI service to read all xml files in a Sharepoint folder.
I've tried:
- creating the data flow in Power BI service, via "New entity" -> "SharePoint folder" -> Got " DataSource.Error: SharePoint: Falha do pedido: The remote server returned an error: (400) Bad Request. (Bad Request). (ID de Sessão: 1bdcb37a-6d47-49be-91c7-da1f0e553db5)"
- creating the connection in Power BI Desktop via web URL (so I can copy the code in advanced editor and paste it in the data flow advanced editor later" -> Got the error "Can't update with current credentials. Try again later".
- creating the connection in Power BI Desktop via SharePoint Folder (so I can copy the code in advanced editor and paste it in the data flow advanced editor later" -> Got the error "Access to the resource is forbidden".
In all these attempts:
- I'm logged in with the same Power BI Pro account (same for the Sharepoint site authentication)
- I'm passing the site URL https://xxxx.sharepoint.com/sites/Projects
Also tried all sorts of combinations to this URL to go directly to the specific folder I'm targeting.
Any help anyone? Is this a bug or am I doing something wrong?
Thank You!
Hi webportal
For SharePoint connector - Make sure you supply the root address of the SharePoint site, without any subfolders or documents. For example, use link similar to the following: https://microsoft.sharepoint.com/teams/ObjectModel.
Please try below workaround:
Select Blank Query and then enter the below as the source. Click next and you can go from there. You would just enter the URL that you would normally do when you select SharePoint Folder in the desktop version.
Source = SharePoint.Files("https://[YOURSITE].sharepoint.com/sites/[YOUR SITE]/", [ApiVersion = 15])It looks like it's a bit cut down though so there's no button to automatically combine files together as you can in desktop.
EDIT: Managed to get the file combination working with a bit of tweaking - I found it easier to create the query and desktop then copy the whole lot over into a blank query.
2 Replies
- v-diye-msftCommunity Support
Hi webportal
For SharePoint connector - Make sure you supply the root address of the SharePoint site, without any subfolders or documents. For example, use link similar to the following: https://microsoft.sharepoint.com/teams/ObjectModel.
Please try below workaround:
Select Blank Query and then enter the below as the source. Click next and you can go from there. You would just enter the URL that you would normally do when you select SharePoint Folder in the desktop version.
Source = SharePoint.Files("https://[YOURSITE].sharepoint.com/sites/[YOUR SITE]/", [ApiVersion = 15])It looks like it's a bit cut down though so there's no button to automatically combine files together as you can in desktop.
EDIT: Managed to get the file combination working with a bit of tweaking - I found it easier to create the query and desktop then copy the whole lot over into a blank query.
- venalMemorable Member
Please refer the below links.
https://powerbi.microsoft.com/en-us/blog/combining-excel-files-hosted-on-a-sharepoint-folder/
https://powerbi.tips/2016/09/loading-excel-files-from-sharepoint/
If you have any queries, please let us know.
If this post helps, then please consider Accept it as the solution to help the other members find it more
If this post was helpful may I ask you to mark it as solution and click on thumb symbol?