I posed this to the Microsoft forum a few days ago but got no responses so trying here.Using the Modify Flow Run-Only Users action in Power Automate allows us to set run-only users in an automated process.
I need to do this, but the user needs to be a specific SharePoint document library or list.
If I use the action List Flow Run-Only Users on an existing flow with the the trigger For a selected item, the response looks like this:
The Modify Run-Only Users action asks for only the id and type, without the properties object, which you can see above contains the delegatedAuthResource object that appears to specify the site URL and list/library ID.
Also it's hard to pick where that GUID comes from in the id after /DELETGATED-xxxIt looks like this run-only user perhaps needs to created first, then assigned to the flow using the Modify Flow Run-Only Users action but I can't find any guidance on the matter.Has anyone solved this before, and if so, how?I need to copy a templated flow as part of a process that stands up new SharePoint sites from a PnP template. It's all fairly straight forward to get the flow definition from the template, replace values in the definition such as the SharePoint trigger and action's site URL and list/library IDs, but assigning the run only permission to the relevant site/library after the flow has been created is not so straight forward. This looks like the way to do it, but perhaps there's another method. I'm open to suggestions!TIAWill.