Forum Discussion
Sharepoint data source in both Gateway and Cloud connections
Testing a report linking to sharepoint data source. I have created the cloud connection and also have a connection to on site SQL server connecting via on prem GW.
However the SP file appears twice in Clound and under GW? Why it should only be under cloud and nothing to do with the GW ??
Hi Si_7777,
Thank you for reaching out to the Microsoft Fabric Forum Community.Thank you BhavinVyas3003, for your helpful insights.
The content In a manner such that it is ambiguous whether the content is cloud based. As a consequence the SharePoint source will show up under both Gateway and Cloud connections, even though SharePoint Online should only be accessed under a cloud connection using OAuth2. Can you just revise your Power Query M code to utilize the out-of-box SharePoint connector:
Instead of the Web. Contents(...), use SharePoint. Files ("https://yourtenant.sharepoint.com/sites/YourSite", [ApiVersion = 15]).This helps Power BI clearly recognize the source as a cloud connection, avoiding any unnecessary gateway mapping. After updating the code, re-publish your report to the Power BI Service and update the credentials under "Data source credentials" using OAuth2. If the SharePoint source still appears under the gateway section, leave it unmapped Power BI will use the cloud connection as long as it's correctly defined.
Regarding the Manage Gateways screen, you're correct that you may not see a data source to delete if it wasn’t manually added Power BI may just be inferring it based on the structure of the query. So, the key fix here is in the M code, not the gateway configuration. Hope this helps, and feel free to share your query if you'd like assistance reviewing it.
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you.
8 Replies
- BhavinVyas3003
Super User
The SharePoint data source appears under both Cloud and Gateway because Power BI may misclassify it if the M code like Web.Contents, isn't structured clearly for cloud. SharePoint Online should only use a cloud connection. remove any mapping to the gateway and ensure credentials are set using OAuth2 under Data Source Settings.
- Si_7777
Advocate II
How can I remove the Web sharepoint from under gataway. I dont want to add to gateway as I have a cloud connection setup
- BhavinVyas3003
Super User
Go to Power BI Service > Manage Gateways.
Select the gateway
Under Data Sources, find the SharePoint (Web) entry.
Click the three dots next to it and choose Remove or Delete.
- Si_7777
Advocate II
Thanks for your help but dont see an option for data source under manage gateways
- v-saisrao-msft
Community Support
Hi Si_7777,
Thank you for reaching out to the Microsoft Fabric Forum Community.Thank you BhavinVyas3003, for your helpful insights.
The content In a manner such that it is ambiguous whether the content is cloud based. As a consequence the SharePoint source will show up under both Gateway and Cloud connections, even though SharePoint Online should only be accessed under a cloud connection using OAuth2. Can you just revise your Power Query M code to utilize the out-of-box SharePoint connector:
Instead of the Web. Contents(...), use SharePoint. Files ("https://yourtenant.sharepoint.com/sites/YourSite", [ApiVersion = 15]).This helps Power BI clearly recognize the source as a cloud connection, avoiding any unnecessary gateway mapping. After updating the code, re-publish your report to the Power BI Service and update the credentials under "Data source credentials" using OAuth2. If the SharePoint source still appears under the gateway section, leave it unmapped Power BI will use the cloud connection as long as it's correctly defined.
Regarding the Manage Gateways screen, you're correct that you may not see a data source to delete if it wasn’t manually added Power BI may just be inferring it based on the structure of the query. So, the key fix here is in the M code, not the gateway configuration. Hope this helps, and feel free to share your query if you'd like assistance reviewing it.
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you.
- v-saisrao-msft
Community Support
Hi Si_7777,
We haven’t heard back from you regarding your issue. If it has been resolved, please mark the helpful response as the solution and give a ‘Kudos’ to assist others. If you still need support, let us know.
Thank you.