Microsoft 365 Group membership approval
This is a write-up of something I demonstrated earlier today. In this article I will share how you can use Power Automate to create a membership approval process for Microsoft 365 Groups owners.
This question from QduBruyn:
I’d like to see if I can use Power Automate to automate the process of adding a user to a group after the group owner approves it.
Power Users Community thread: Automate M365 group membership.
Like suggested in the thread we want to start this process with a registration form. In this example I used Microsoft Forms. A user has to be logged on and can submit a request to join a Microsoft 365 Group.
After submitting a response the flow will try and retrieve the correct group and send an approval to the owner. This owner could approve (or reject) this request via the Approval Centre.
1. Add a When a new response is submitted trigger action. Select your Form.
2. Add a Get response details action. Select your Form. Make sure you also select the Response Id dynamic content field.
3. Add Get user profile (V2) action. Use the Responders’ Email in the User field.
This action will retrieve the details of the user who submitted the form.
4. Add a Send an HTTP request (Office 365 Group connector) action. Make sure you use the GET method and the URI from the code snippet below. Also make sure you replace the question by the question from your Form.
This action is to retrieve the specific Microsoft 365 Group.
5. Add a Condition action. Check if the length of the value property is not equal to zero. If that is the case your HTTP request has found a matching Group. Use the expression below for that length check.
This action is to check if the Microsoft 365 Group exists.
6. Add a Start and wait for an approval action within the Condition – If yes section. Select an Approval type, in this example First to respond. Set a Title, I reused the Display Name and the Group Name. Use the expression below in the Assigned To field.
7. Add a second Condition action within the Condition – If yes section. Use the Outcome field and check if it is equal to Approve.
This action is to check if the owner approved the request.
8. Add a Add member to group action within the second Condition – If yes section. Use the Reponders’ Email for the User Principal Name. Use the expression below for the Group Id.
That should be it for the setup.
When you test it you should see the new member be listed in the Group (after approval) like below.