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 / Send Http Request - mu...
Power Automate
Unanswered

Send Http Request - multiple owners

(0) ShareShare
ReportReport
Posted on by 545

I have a flow that runs from a PowerApp to create a new sharePoint site.  So far so good.

 

What I want to do now is update the Owner field.  My Power App contains a people picker and the user can choose multiple people.  How can I use that data in the Owner part of Send a http request?

 

And/or is it possible for the Owner part to be a group of emails as opposed to an email address?  I.e. an outlook groups set up with individual emails in it.

 

RMD211_0-1648121334519.png

Thanks!!

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

    Hi @RMD211,

     

    As far as I am aware both in the interface and via the REST API you can only set one owner when creating the site initially. However, it should be possible to add more owners after it has been created.

     

    There are different approaches. You could PowerShell, a Site Design, or you could for example add an additional owner to the related Office 365 Group.

     

    Below is an example of that last approach.

    You have to play a bit with the delay settings. It might take some time before your site has been created and the group can be found.

     

    1. Add a Delay action. I used 16 minutes 😂

     

    2. Add a Send an HTTP Request action. Use the List groups method of the Graph API. I am using a $filter parameter for the displayName

     

    https://graph.microsoft.com/v1.0/groups/?$filter=displayName eq '@{variables('SiteName')}'

     

     

    3. Use a Condition to check if can find the newly created group.

     

    length(body('Send_an_HTTP_request_-_Find_Office_365_Group')['value'])

     

     

    4. If Yes, Use another Send an HTTP request action with the Add owners method of the Graph API. In the URI the following expression is used to retrieve the Group Id:

     

    body('Send_an_HTTP_request_-_Find_Office_365_Group')['value'][0]['id']

     

     

    addgroupowner.png

  • RM-30040732-0 Profile Picture
    545 on at

    Thanks! I think my request for the outlook group was unclear.

     

    We have a group of admins - called Support - that is not linked to an email address.  Can this be used in the owner part?

     

    The other Owners on the site will be individual people which I can add on as additional steps.  But I'm having difficulty pulling the people from the people picker on the app into the flow - If I use initialise a variable (string) it only pulls back one email (when there could be many) and if I use initialise a variable (array) the flow doesn't let me save it?

     

  • Expiscornovus Profile Picture
    33,851 Most Valuable Professional on at

    Hi @RMD211,

     

    Sorry, I missed the part were you used the STS#3 template. So, it is a Team site without a connected Office 365 Group, correct? Ignore the previous approach, my bad 😅

     

    In that case you could just add users to the Owners Site group. You can use another Send an HTTP request for that.

     

    Below is an example.

    I believe the out of the box Site Owners group has the ID of 3. Unless you use a custom group yourself, in that case you need to refer to a different id.

     

    1. Initialize an array variable.

    ["emaila@contoso.com","emailb@contoso.com"]

    emailaddresses_array.png

     

    2. Add an Apply to each loop after the site creation action. Loop through the EmailAddressess array

     

    3. Within the loop use another Send an HTTP request action. In the body use the item()

     

    {
     "LoginName": "i:0#.f|membership|@{item()}"
    }

    addusers_tositegroups.png

  • RM-30040732-0 Profile Picture
    545 on at

    Thanks - so the step that fails for me is the very first part - the array variable - the email addresses I need will be selected on my app and need to be passed over to the flow.  When I use an array it won't connect them. If I use string I only get the last email chosen. How can I move the data from my app to the flow when there's multiple emails?

  • Expiscornovus Profile Picture
    33,851 Most Valuable Professional on at

    Hi @RMD211,

     

    How are you collecting and sending your email addresses in PowerApps?

     

    I believe you can use a JSON function to send the collection in the Run function in PowerApps:

    https://debajmecrm.com/how-to-pass-an-array-from-powerapps-to-power-automate/

     

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 801

#2
Valantis Profile Picture

Valantis 602

#3
Haque Profile Picture

Haque 581

Last 30 days Overall leaderboard