Update Multi-Values with People Picker Field in Power Automate/Microsoft Flow
Introduction
- Find an Office 365 group ID associated with site
- Find a list of all members of this office 365 group
- Add these members to a list column (people picker with multi-value)
"d": {
"GroupId": "8db58c1c-22-232-adde-2332"
}
}
"Claims": "i:0#.f|membership|@{items('Apply_to_each')?['mail']}",
"Email": "@{items('Apply_to_each')?['mail']}"
}
Comments
-
Update Multi-Values with People Picker Field in Power Automate/Microsoft Flow
When I tried to recreate this GroupId is returned as 00000000-0000-0000-0000-000000000000?
So it fails at the "List the Group Members".
In step 3 do you leave the Body blank?
And in step 4 you click "user sample to generate schema" and paste in the below JSON?
{
"d": {
"GroupId": "Office 365 ID"
}
}Also I was wondering why do I need to do these steps, why can I not just put in the specific "group ID" into the "List Group Members action"
-
Update Multi-Values with People Picker Field in Power Automate/Microsoft Flow
Hi @siddharth_v ,
Thank you for taking the time to write this post. I'm trying to accomplish something similar to what you describe here, but instead of an O365 Group I need to assign a SharePoint List item to members of a SharePoint Group. I can get the users of the SP Group fine via an API call, but I get the following error on the For Each action:
The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@outputs('GetSPGroupUsers')?['body']' is of type 'Object'. The result must be a valid array.
My flow looks like this:
I suspect that I need to use a different output in my Apply to Each action (currently it is the 'body' of GetSPGroupUsers), but I don't know what or how to get it. I retrieve the users from the SP Group by calling the API as follows:
That works fine, it gets me the expected output.
Can you tell me what I am doing wrong?
*This post is locked for comments