Forum Discussion
Emalong94
Jul 10, 2023Copper Contributor
(Solved) Power Query credentials with data from SharePoint
Hi Everyone, I have an Excel file in A SharePoint folder meant as a template for users that can download it to run specific tasks. To validate the template drop-down lists, the file gets data fr...
- Jul 10, 2023
You don't need to call entire SharePoint site to filter and access single file. Instead you may use From Web connector. Open file in desktop app, File->copy path at the top. Remove ?web=1 at the end of URL and use it in From Web connector.
With that you may give user R/O rights on Template, that will be enough.
Emalong94
Jul 10, 2023Copper Contributor
Hi @Sergei,
I changed the connector from Sharepoint.contents to Web.contents, it works thank you!
The log-in pop-up will still open when Users will access the Template file for the first time and it will be challenging explain them how to correctly sign in with organizational account but at least they can run the query.
About the source file (aka "Datasouce.xlsx"), are you sure they only need R/O rights and not Edit rights instead?
Thank you,
Emanuele
I changed the connector from Sharepoint.contents to Web.contents, it works thank you!
The log-in pop-up will still open when Users will access the Template file for the first time and it will be challenging explain them how to correctly sign in with organizational account but at least they can run the query.
About the source file (aka "Datasouce.xlsx"), are you sure they only need R/O rights and not Edit rights instead?
Thank you,
Emanuele
SergeiBaklan
Jul 10, 2023Diamond Contributor
Hi Emanuele,
I'm not 100% sure since didn't test exactly, but from common logic R/O shall be enough to query the file.
- Emalong94Jul 10, 2023Copper ContributorI tested it and I confirm! R/O rights on the source file is enough.
Also, the query needs less time to run (of course) so I guess it's a double win!
Thank you very much for your help on solving the case Sergei! Appreciated!
Emanuele- SergeiBaklanJul 10, 2023Diamond Contributor
Emanuele, you are welcome, glad to help.
Yes, performance shall be much better. Querying entire site you enumerate all files one by one, only after that apply the filter. All together takes lot of time.