Forum Discussion
Unable to get data from sharepoint folder
- 9 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
Hey noahrivett ,
I ran into the same issue when trying to connect a SharePoint folder in Power BI Service after everything worked fine in Power BI Desktop. The root cause was that the web service requires a proper cloud connection, not a gateway connection, for SharePoint sources.
Here’s what fixed it for me:
Use “SharePoint Folder” with the site root only
In Power BI Service, create a new data source and enter only the site URL, e.g.:
https://yourcompany.sharepoint.com/sites/YourSite
Do not paste the full library/folder path.Set the authentication method correctly
Choose:
OAuth2 → Organizational Account → Sign In
(Anything else will trigger the gateway error.)Remove the gateway mapping
SharePoint Online does not need a gateway.
Go to Manage Gateways → remove any mapping to this dataset so Power BI doesn’t try to use the data gateway.Refresh credentials in the dataset
Dataset → Settings → Data Source Credentials → Re-enter with OAuth2.
After doing this, Power BI Service connected instantly and the dataset refreshed without errors. The key insight was that the service always tries to use cloud credentials for SharePoint, and forcing a gateway will break the connection every time.