Sometimes, when working with SharePoint sites for a client, you may want complete control over everything on that site, including all subsites, libraries, lists, and settings. In this case, you require Site Owner permission on the SharePoint Online site.
In this tutorial, I will show you not only how to add one user, but also how to add multiple users as site owners in a SharePoint site using Power Automate.
Add Site Owner in SharePoint Online Using REST API
Here, we are using the Send an HTTP Request to SharePoint action and the SharePoint REST API site owner permissions for a user.
For this example, I have created a team site with a connected Microsoft 365 group called HR Internal, where I want to add Miriam Graham as a Site owner.
However, you can follow the same steps to add a Site owner to a communication site, a team site (without a connected Microsoft 365 group), or a team site with a connected Microsoft 365 group (Team Connected Site).
Below are the steps to add a Site owner in a SharePoint site using the REST API:
- Go to the Power Automate site and create a new Instant cloud flow with Manually trigger a flow trigger.
- Add a Send an HTTP Request to SharePoint action and provide the below parameters:
- Site Address: Select the SharePoint Site Address.
- Method: Select POST as the method.
- Uri: Provide the below URI:
_api/web/siteGroups/GetById(3)/users
- _api/web – This is saying we’re working with the current SharePoint site (web).
- siteGroups – We’re looking at the groups in the site.
- GetById(3) – We want the group that has the ID 3.
- /users – From that group, we want to get the users (members).
| Owner | Member | Visitors |
| 3 | 5 | 4 |
- Click on the Show all button to display all the Advanced parameters.
- Headers: Click on the Switch to text mode button to the icon to input the json. Copy and paste the code below in the Headers section.
{
"accept": "application/json;odata=verbose",
"content-type": "application/json;odata=verbose"
}
- Body:
{
"__metadata": {
"type": "SP.User"
},
"LoginName": "i:0#.f|membership|MiriamG@<tanant name>.onmicrosoft.com"
}

- Then, save the flow and run it manually. Once the flow runs, you can see that the specified user will be added as a Site owner to your SharePoint site.

Here, I manually add the user, but you can add the user dynamically using dynamic content.
Add Multiple Users to a Site Owner Using the REST API
Now I will create the same instant cloud flow, but this time we will dynamically add Multiple users to it. Follow the steps below:
- Open the Power Automate Home page and choose Instant cloud flow with trigger Manually trigger a flow.
- Then, click ‘ Manually trigger a flow’ and add an email parameter.

- Then, add a Compose action and use the following expression to split the string using a semicolon, converting it into an array. This is useful when multiple users are added, as they are returned in a single string.
split(triggerBody()?['email'],';')
- Add Apply to each loop flow action, which will loop through all the users one by one.
- Select an output from previous steps: Take the Outputs of a compose action.
