August 5, 2021

How to add user to Office 365 Group using Power Automate?

Overview:

We recently implemented an application on Power Platform for a consulting firm based out of Alpharetta, Georgia, United States. We came across a scenario to add the user to Office 365 Group using Power Automate. So, how can we achieve this requirement? Let's get started.

Step 1:

Create Power Automate flow and search for “Office 365 Groups”.
 

Step 2:

From, action choose “Add member to group”.
 

Step 3:

It will ask for following two parameters:
Group ID = It will show all groups available to your Office 365 account.
User Principal Name  = We need to provide user name to be added to the group.
 


Step 4:

Run the Power Automate flow and check the result.
The user has been added to Office 365 Group.
 

Conclusion:

This is how we can simply add user to Office 365 groups! Happy Automation!

If you have any questions you can reach out our SharePoint Consulting team here.

3 comments:

  1. How to add user (User name and E-mail id) from ShrarePoint List to Office 365 Group?

    ReplyDelete
  2. Can the user be added as an Owner?

    ReplyDelete
  3. In Power Automate , Please follow this steps

    Step 1: Add “List groups” action and in that add odata filter in “Filter rows” to get Group Id, which we will use in further step to add user as an owner in group.
    Filter rows - displayName eq ‘GroupName’ (GroupName will be column value from SP list)

    Step 2: Add “Get user profile” action to get User ID, which we will use in further step to add user as an owner in group.
    User (UPN) – User Email ID (UserEmailID will be column value from SP list)

    Step 3: Add “Send an HTTP request V2” action to add user as an owner in group.

    POST https://graph.microsoft.com/v1.0/groups/{id}/owners/$ref
    Content-type: application/json
    {
    "@odata.id": "https://graph.microsoft.com/v1.0/users/{id}"
    }

    ReplyDelete