Forum Discussion
Permissions Required to Run Excel Scripts in Logic Apps
- Nov 09, 2023
Hi Martin, thank you for reaching out!
The run script block action by default only supports running scripts that are stored on the current user's own OneDrive for Business ( /Documents/Office Scripts folder) which is why the scripts are not showing up even if you have given your service account permissions to your folder.
Here is a solution that could unblock your situation.
You could try using the 'Run Script from SharePoint library' action.
Here, you will be able to specify a shared location where the script you want to run can be found.
I hope this helps, and please let me know if you have any more questions.
Michael Vaquier
Hi Martin, thank you for reaching out!
The run script block action by default only supports running scripts that are stored on the current user's own OneDrive for Business ( /Documents/Office Scripts folder) which is why the scripts are not showing up even if you have given your service account permissions to your folder.
Here is a solution that could unblock your situation.
You could try using the 'Run Script from SharePoint library' action.
Here, you will be able to specify a shared location where the script you want to run can be found.
I hope this helps, and please let me know if you have any more questions.
Michael Vaquier
- Geordie_caNov 10, 2023Copper Contributor
Hi Michael, Thanks for your response on this issue. I was not aware that when I save a script Excel that the script is actually being saves to my One Drive and not stored in the Excel document. With this info, it makes sense that the service account cannot access the script.
From your response and reviewing this MS documentation page (https://learn.microsoft.com/en-us/office/dev/scripts/overview/script-storage), I have been able to move the script to Sharepoint and update my Logic App to use the service account. Since it is initiated by a 3rd party nightly process, I will find out if it works tomorrow. But it is looking good...
Thanks Again.
Martin