top of page

MyGroups App – Manage groups with Power Apps & Flows

  • Writer: kim
    kim
  • Mar 23
  • 2 min read

With the MyGroups app, you can manage members and owners in Microsoft 365 groups and set the security status (securityEnabled). The app combines direct Power Apps functionality with dedicated Power Automate flows to provide a sleek yet powerful user interface for group management.



Retrieve groups for which the logged-in user is the owner – without flows

To manage groups, the first step is to load all groups owned by the logged-in user. This includes M365 and Entra security groups.


ClearCollect(colGroups,Office365Groups.ListOwnedGroupsV2().value)

Add and remove members – without flows

Function:

To add and remove group members, the app uses the Office365Groups Connector directly – without Power Automate.



Clicking on a group will display all members (max. 999)



Search for people:

UpdateContext({locSearchUserResult:Office365Users.SearchUserV2({searchTerm:Self.Text}).value})

Adding members:

Office365Groups.AddMemberToGroup(groupId, userEmail)

Removing members:

Office365Groups.RemoveMemberFromGroup(groupId, userEmail)


Add, list and remove owners – via Flow

Function:

For owner management, the app uses Power Automate Flows because these actions are mapped via the Microsoft Graph API.


a) List owners


Flow: Get Group Owners

  • The flow is triggered when the group changes

  • Retrieves all owners via /groups/{id}/owners


Add Owner

Flow: Add Group Owner

  • Entering the person

  • Passing group ID and user ID to the flow

  • Flow uses an HTTP POST against /groups/{id}/owners/$ref




Flow: Remove Group Owner

  • Selecting an owner from the list

  • Passing group ID and user ID to the flow

  • Flow uses an HTTP DELETE against /groups/{id}/owners/{id}/$ref




Set group to "Security Enabled" – via Flow

Function:

Setting the securityEnabled value isn't possible via the standard connectors. A Power Automate flow is used here.

Process:

  • User clicks on “Set Security Enabled”

  • Flow is called with group ID

  • Flow executes HTTP PATCH against /groups/{id} with payload:

{
  "securityEnabled": true
}



Summary: What happens where?

function

App directly (Connector)

Power Automate Flow

Add members

Remove members

List Owner

Add Owner

Remove owner

Set group to Security Enabled

Conclusion:

The MyGroups app is a practical example of the effective combination of Power Apps frontend and Power Automate backend to perform administrative tasks without access to Entra or Azure portals – ideal, for example, for decentralized teams, IT-savvy departments, or IT helpdesks.

 
 
 

Komentarze


bottom of page