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 / Amend HTTP request to ...
Power Automate
Unanswered

Amend HTTP request to add second SharePoint site owner

(0) ShareShare
ReportReport
Posted on by 84

Hello,

 

Is it possible to amend the HTTP request Body to add a second owner to a Communication SharePoint site?

 

This successfully creates a Communication site with one owner, but I'm struggling to find a way to add a second owner either in this step or in a separate step after - as Communication sites don't create Groups. 

Carl__D_1-1626795853535.png

 

{
"request":{
"Title":"@{variables('SiteTitle')}",
"Lcid":1033,
"Description":"",
"Classification":"",
"ShareByEmailEnabled":false,
"SiteDesignId":"00000000-0000-0000-0000-000000000000",
"Url":"https://xxxx.sharepoint.com/sites/@{variables('SiteTitle')}",
"WebTemplate":"SITEPAGEPUBLISHING#0",
"Owner":"@{outputs('Update_Prefix')?['body/PrimaryOwner/Email']}",
"WebTemplateExtensionId":"00000000-0000-0000-0000-000000000000"
}
}

 

Any help is welcome!

 

Thank you

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

    Hi @Carl__D,

     

    It would be possible to use a site design for this with a script action which adds the user to the Owners group.

     

    You could use another REST api request to apply that custom site design after the communication site has been created in your flow setup.

     

    Below is an example of that approach.

     

    1. Create a site script and add it via the Add-SPOSiteScript cmdlet to your tenant via SharePoint Online PowerShell.
    Replace the principal value by the user or group you want to use to add to the owners.

     

    $script = @'
    {
     "$schema": "schema.json",
     "actions": [
     {
     "verb": "addPrincipalToSPGroup",
     "principal": "jane@contoso.onmicrosoft.com",
     "group": "Owners"
     }
     ],
     "bindata": { },
     "version": 1
     };
    '@
    
    Add-SPOSiteScript -Title "Add additional owners" -Description "A site script to add more owners" -Content $script

     

     

    2. Use the ID from the output to create a Site Design via the Add-SPOSiteDesign cmdlet. 68 is the id of a Communication site btw.

     

    Add-SPOSiteDesign -Title "Test Communication Site" -WebTemplate 68 -SiteScripts e6af90d6-57e2-4c23-b899-c5e222c73050

     

     

    addspositedesign.png

     

    3. Add another Send an HTTP request to SharePoint action. Use your new site for the site address field. Use the AddSiteDesignTaskToCurrentWeb method in the URI:

     

    /_api/Microsoft.SharePoint.Utilities.WebTemplateExtensions.SiteScriptUtility.AddSiteDesignTaskToCurrentWeb

     

     

     

    {
     "siteDesignId": "@{variables('SPOSiteDesign')}"
    }

     

     

    addsitedesign.png

     

     

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 796

#2
Valantis Profile Picture

Valantis 671

#3
Haque Profile Picture

Haque 551

Last 30 days Overall leaderboard