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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Assign existing AAD se...
Power Automate
Answered

Assign existing AAD security group as owner / member /visitor of SharePoint site during creation

(0) ShareShare
ReportReport
Posted on by 19

Hi,

 

I'm in the process of building a PowerApp that allows user input to define the creation of project sites & libraries in SharePoint (online) via Power Automate.

 

I've got everything working, site creation, document libraries, views etc working... but now need to add existing AAD security groups to the "Owners", "Members" and "Visitors" of the newly created site.  There will ultimately be hundreds of sites, all with the same permissions requirements, so I don't want to create new security groups for each site.  There will only be the 3 groups (Owners, Members, Visitors) in use across all of the sites.

 

Much googling has been done, but I haven't been able to find a way to do this from within a flow.  Happy to use the HTTP request to get this done, (if it is possible to do it this way), if so, help with the URI / Headers / Body would be greatly appreciated.

 

Thanks 🙂

Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @gjme,

     

    If you want to add an existing identity to an existing SharePoint group you could use a POST request against the sitegroups. 

     

    Below is an example

    In this example I used a SharePoint Group with (prinicipal) id 3. Normally for Team sites that is the out of the box owners group. Do check if that is the correct id in your setup though. Visitors would be id 4 and Members would be id 5.

     

    Secondly replace the LoginName value by your value. In this case the format for an Azure Active Directory security group is

     

    c:0t.c|tenant|<groupid>

     

     

    aadsecuritygroup_tospgroup.png

  • gjme Profile Picture
    19 on at

    Thanks @Expiscornovus that worked perfectly 🙂

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard