Forum Discussion
Unable to get data from sharepoint folder
- 8 months ago
This Issue was caused my me orginally creating the model on desktop and then uploading it to power bi online which for some reason prevented it from importing any new data at all. kept getting the same error if i tried to link it to a one drive file and would give the error when i would upload an excel file to it
The issue was fixed by me just recreating the model on power bi as that allow me to import data from any source
Thanks for the help
Hi noahrivett
This error occurs because the Power BI Service cannot directly access SharePoint files without a properly configured gateway or cloud connection, even if it works in Power BI Desktop. When you publish a report that uses a SharePoint Folder connector, the service needs credentials and a data source configuration to refresh or access the files.
“We experienced an error when trying to access the data gateway.”
Confirm SharePoint type
- If your SharePoint is SharePoint Online (Microsoft 365):
- No gateway is needed.
- Go to Power BI Service → Settings → Datasets → Data source credentials.
- Set authentication method to OAuth2 and sign in with your organisational account.
Use the correct connector
- In Desktop, use SharePoint Folder or SharePoint Online List with the full site URL:
https://yourtenant.sharepoint.com/sites/yoursite
Best Practice
- For SharePoint Online, always use OAuth2 authentication.
- For large folders, filter in Power Query early to avoid performance issues.
If this answer was helpful in any way, I would be pleased to receive a 👍, as well as the satisfaction of seeing a DAX measure work for the first time without needing yet another FILTER.
Please mark it as the accepted solution. This helps other community members find the quickest path and saves them from another endless loop 🌀.
Thanks for the reply,
This solution doesnt work, the authentification method was already set to OAuth2 and so i still get the same error
- tayloramy8 months agoSuper User
Hi noahrivett,
Are you connecting to SharePoint Online, or an on prem installation of SharePoint?
If you're connecting to SPO, a gateway isn't needed and will only complicate things.Are you able to share with us the settings of the connection itself? In the rop right, click onthe settings gear and click "Manage connections and gateways" and from there you should be able to find it.
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.
- noahrivett8 months agoFrequent Visitor
I still get the error irrelivent of whether the tick box for allow this connection to be utilized .... is ticked or not
I literally could never choose to use a gateway at all when trying to connect
when i would try to make a new connection the only option given for data gateway was (none)