Forum Discussion
Set AssociatedOwnerGroup for a web using REST
Not sure if it is possible using SharePoint REST API. However, you can easily do it using PnP PowerShell like:
Connect-PnPOnline -Url $sitetUrl
Set-PnPGroup -Identity 'My Site Owners' -SetAssociatedGroup Owners
Documentation: Set-PnPGroup
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
For SharePoint/Power Platform blogs, visit: Ganesh Sanap Blogs
- Ankit JetaniMay 08, 2023Copper Contributor
Yes, I'm aware that it's possible using PnP PowerShell but I'm specifically looking to do it in Power Automate using REST API as I'm trying to automate the entire process. And to use PnP PowerShell, we have to use either Azure Function or Azure Automation Runbook which unfortunately isn't an option for me.
On this reference page for site-related resources and endpoints for the SharePoint REST API - https://learn.microsoft.com/en-us/previous-versions/office/developer/sharepoint-rest-reference/dn499819(v=office.15)
it's mentioned that the AssociatedMemberGroup, AssociatedOwnerGroup and AssociatedVisitorGroup are available via REST API and are read/write properties (of the web) of type https://learn.microsoft.com/en-us/previous-versions/office/developer/sharepoint-rest-reference/dn531432(v=office.15). So I tried to update it with the 'Send an HTTP request to SharePoint' action with the below parameters and it runs successfully but it doesn't update the site owner group.
And if I run it with GET method without the parameters, it successfully gives me the current owner group.
So I'm trying to figure out the right parameters for the POST request but haven't been successful so far. Any help would be appreciated. Thanks in advance!
- SANDSMANMay 29, 2025Copper Contributor
Hey there
I'm looking to solve this exact same issue. Did you ever find the answer?