
Announcements
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:
"body": {
"value": [
{
"name": "DELEGATED-8a87a010-xxxx-xxxx-6b7b-e7c1f3b391a4",
"id": "/providers/Microsoft.Flow/environments/Default-deae25e1-xxxx-xxx-884a-2696a67a60c5/flows/f7a3e163-76e8-xxxx-xxxx-62ba001b5b48/users/DELEGATED-8a87a010-3716-xxxx-xxxx-e7c1f3b391a4",
"type": "/providers/Microsoft.Flow/environments/flows/users",
"properties": {
"permissionType": "AuthorizationDelegate",
"authorizationDelegate": {
"accessDefinition": {
"sharePointBasePermissions": [
{
"high": 0,
"low": 15
}
]
},
"delegationSource": {
"delegationService": "SharePoint",
"contractVersion": "2017-12-01"
},
"delegatedAuthResource": {
"resourceCollection": "https://xxxxxx.sharepoint.com/sites/xxxxxx_common",
"resourceId": "823acca3-xxxx-xxxx-980e-6467283ea7df"
}
}
}
}
]
}
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-xxx
It 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?