web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Can I add members to S...
Power Apps
Answered

Can I add members to Security mail enabled group via PowerApps?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I have created an app for an internal team in my Company. I have shared my app with a security group (mail-enabled). The normal O365 group was not visible when I was trying to share the app.

 

I have assigned some co-owners for that group. What is the most user-friendly way to add new members to this group? Can I do it in PowerApps?

 

Aakash  

Categories:
I have the same question (0)
  • FlowMohit Profile Picture
    64 on at

    Hi @Anonymous ,

     

    Power Apps can only be shared with security enabled group because it has to receive tokens in order to access app resources.

     

    You can add or remove members to a group using pshell, papps or ui.

     

    In powerapps you have to use two connectors - 

    Make sure the person who will use these two functions within powerapps have co-owner access at app level and owner at the group level.

     

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Do you want to add new members to this Security Group within canvas app?

     

    Firstly, you could share your canvas app to Office 365 Group, but this Office 365 Group must be security enabled. Please check the following article for more details:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/share-app#share-an-app-with-office-365-groups

     

    If you want to add new members to this Security Group in your canvas app, I think Office 365 Groups connector could achieve your needs.

    I have made a test on my side, please take a try with the following workaround:

    Add Office 365 Groups connection and Office 365 Users connection in your app. Then add two Dropdown boxes to list your owned available Groups (including Security Group) and Available users in your Org:

    2.JPG

     

    3.JPG

     

    4.JPG

    Set the Items property of the first Dropdown box (GroupDropdown) to following

    Office365Groups.ListOwnedGroupsV2().value

    Set the Items property of the second Dropdown box (UserDropdown) to following:

    Office365Users.SearchUserV2({top:999}).value

    Set the OnSelect property of the "Add Member" button to following:

    Office365Groups.AddMemberToGroup(GroupDropdown.Selected.id, UserDropdown.Selected.UserPrincipalName)

    Within the GroupDropdown box, select the proper Security Group, then within the User Dropdown box, select proper User you want to add to to this Securoity Group, then press the "Add Member" button, then the selected user would be added into this Security group.

    Note: I assume that you created this Security Group or you are one member of Security Group already

     

    Please take a try with above solution, check if the issue is solved.

     

    Best regards,

  • Gary_Eden Profile Picture
    375 on at

    Hi
    I've built an app to manage user group members in both Office365 (Teams and SharePoint access) and Security Groups (PowerApp access), using the process described. This works perfectly on our own company set up and on another customers account.

     

    However, for a new customer we are trying to attempt the same functionality but only the Office365 add/remove functions work. Trying to add/remove members from security groups throws out a request denied/insufficient privileges error. 

     

    Working with the customers' Azure administrator we have confirmed that I am co-owner of the security groups and that I can add and remove users directly to the security group at the Azure AD level - just not through the app. Comparing my permissions between Office365 and Security Groups they appear the same.

     

    We think that there may be another permission setting somewhere that needs changing but are at a loss as to where to look. 

     

    This is the error (IDs removed).

    Office365Groups.AddMemberToGroup failed: {"error": {"code": "Authorization_RequestDenied", "message": "Insufficient privileges to complete the operation.", "innerError": {"date": "2022-01-24T15:21:48", "request-id": "xxxxxxxxx", "client-request-id": "xxxxxxxx"}}}

     

    Any suggestions on where to look to amend the setting would be appreciated.

     

    Thanks in advance.

    Gary

  • Vaishali999 Profile Picture
    6 on at

    I also getting same error to add members in mail enabled group "Office365Groups.AddMemberToGroup failed: {"error": {"code": "Authorization_RequestDenied", "message": "Insufficient privileges to complete the operation." Is there any solution found using power apps or power automate. Both the ways I have tried getting same error.  Please help.

     

  • Vaishali999 Profile Picture
    6 on at

    I also getting same error to add members in mail enabled group "Office365Groups.AddMemberToGroup failed: {"error": {"code": "Authorization_RequestDenied", "message": "Insufficient privileges to complete the operation." Is there any solution found using power apps or power automate. Both the ways I have tried getting same error.  Please help.

  • tonydileonardo Profile Picture
    2 on at

    I am looking for a solution for this too for mail enabled groups.  (Either power apps or power automate)  There is lot of documentation out there that says it should, but it doesn't.  Even copliot AI will put together the exact same solution for you that does not work.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 103

#2
WarrenBelz Profile Picture

WarrenBelz 82 Most Valuable Professional

#3
wolenberg_ Profile Picture

wolenberg_ 67 Super User 2026 Season 1

Last 30 days Overall leaderboard