“The approval action doesn’t allow me to assign the task to members of a SharePoint group, how should I do that in Power Automate?”
Since Power Automate is quite a new technology, it expects that it’ll work with modern data. And that includes the modern way to manage permissions on SharePoint sites. While SharePoint groups were a good way to manage groups of users in the past, it’s not the right approach anymore. SharePoint groups are being slowly replaced by Microsoft 365 groups – the groups Power Automate is designed to work with.
But there’re still many organisations using SharePoint groups, and if you belong to one of them, this post is for you.
Get the members of a SharePoint group
You can’t use a SharePoint group directly, but you can use the individual users who’re in that group, if you can extract them. As already said, Power Automate doesn’t expect that it’ll work with SharePoint groups so it doesn’t give you any action to extract the users either. That’s why you’ll need an HTTP request to SharePoint.
Add the ‘Send an HTTP request to SharePoint’ action and configure it as below:
Method: GET Uri: _api/web/siteGroups/getByName('<SharePoint group name>')/users
Note: <…> is a placeholder, replace it with the group name including the < and >.
The response will contain an array with all the users in that SharePoint group, including their emails – the only information you need.
As already described, the easiest way to extract only specific value is to use the ‘Select’ action.
Navigate in the JSON to get the list of users, and use it as the input of the ‘Select’.
Switch to the text only mode, and extract only the email address for each user.
The result will be a simple array containing only the emails.
Assign them the task
Turn it into a semicolon separated string with the join(…) expression and use it in the approvals action.
And that’s it, you just assigned an approval task to a SharePoint group.
If you use Power Automate together with SharePoint group(s), no matter if it’s to assign approval tasks or send emails, you’ll need an HTTP request. Power Automate doesn’t support working with SP groups, but it can work with their members. Get the group members, extract their emails, and do whatever you need.