Forum Discussion
philo77
Oct 11, 2022Copper Contributor
Sharepoint Site Permissions Interface Missing for API created Subsite
Hi all, I'm hoping someone will have an idea about this. If I create a new subsite using the GUI, use unique permissions and create the default owners, members and visitors group, when I go to t...
ganeshsanap
Oct 11, 2022MVP
philo77 Can you show us how you associated new groups with owners/members/visitors groups of subsite?
Refer this article doing same thing using PowerShell and see if you can replicate same logic in Power automate flow: SharePoint Online: Create Subsite with Unique Permissions using PowerShell
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.
philo77
Oct 11, 2022Copper Contributor
ganeshsanap I use FLOW and the Send an HTTP request to first create each group and then associate a role definition with each group.
I then run the following powershell script:
$Owners_group = $site_name + ' Owners'
$Members_group = $site_name + ' Members'
$Visitors_group = $site_name + ' Visitors'
Set-PnpGroup -Identity $Owners_group -SetAssociatedGroup Owners -Owner $Owners_group
Set-PnpGroup -Identity $Members_group -SetAssociatedGroup Members -Owner $Owners_group
Set-PnpGroup -Identity $Visitors_group -SetAssociatedGroup Visitors -Owner $Owners_group
I also tried adding the -AddRole parameter as shown in the link you mentioned to no avail.