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 Automate / Add AD Group into Shar...
Power Automate
Unanswered

Add AD Group into SharePoint Group

(0) ShareShare
ReportReport
Posted on by 114

I can successfully add individual users.  How do I modify the HTTP Request below to add and an Azure AD Group?

 

HTTP Request to add Individual UserHTTP Request to add Individual User

Categories:
  • ALBordelon Profile Picture
    114 on at

    To clarify, the AD groups are AD Security Groups

  • sudharsan1985 Profile Picture
    1,325 on at

    Hi @ALBordelon 

    Have you tried adding the UPN of the Azure AD Group using the same API?

  • ALBordelon Profile Picture
    114 on at

    I have not tried the UPN of the AD Group.  How would I find the UPN?

  • ALBordelon Profile Picture
    114 on at

    I figured it out, I was having issues finding the LoginName for each group but I was able to locate using a Sent HTTP Request

     

    Step 1: Add all AD Groups into a single SharePoint Group

    Step 2: Use HTTP Request to get a listing of all users in the SharePoint Group

    • Uri: _api/web/sitegroups/getbyname('SPGroupName')/users

     

    Flow Help1.png

    • From the Results, I was able to get the LoginName for each Group
      • My AD Group is cAPTure-Proposal_Project Controls

    flow help2.png

     

    Step 3: Use the LoginName to add the AD Group into the SharePoint Group using the HTTP Request 

     

    flow help 3.png

     

    If there is a simpler way to get the LoginName, please let me know

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi This one looks promising,

     

    Could you please provide the screen capture of your complete flow please?

    What have you assigned in varGroup ??

  • petrinnn Profile Picture
    18 on at

    You are using the sintaxe to add only users.

     

    To add groups, change for this, after LoginName

     

    Grupo M365
    "c:0o.c|federateddirectoryclaimprovider|nomegrupo@ayoshii.com.br"

     

    Grupo Segurança
    "c:0t.c|tenant|<groupid>"

     

    Like this...

    'LoginName':"c:0t.c|tenant|b653754-dcc7-4641-b7b0-2221425a1d98"

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 244

#3
Henil Profile Picture

Henil 102

Last 30 days Overall leaderboard