cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
illmatic
Helper IV
Helper IV

SharePoint Request - Add a SPGroup to site

I am trying to figure out how to take an existing group from a parent site, and add it to subsite permissions [with custom permissions] dynamically.

 

I have queried the group via a SharePoint request like so:

leadership_Ex.png

 

And am attempting to take the group and place it on a site like so:

leadership_Ex2.png

The body expression is as follows:  "body('action')?['Title']

 

The response I get is a 400 error which states that the parameter is not allowed.   Is it possible to add an existing group to a site?

 

parameters
Parameter name: Specified value is not supported for the parameters parameter.

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User II
Super User II

Hi @illmatic,

 

Adding an existing group should be possible by using the addroleassignment method. You can refer to the principalid and set a specific role, like contribute permissions.

 

Below is an example of that:

_api/web/roleassignments/addroleassignment(principalid=@{variables('GroupID')},roledefid=1073741827)

addroleassignment_powerautomate.png

View solution in original post

1 REPLY 1
Expiscornovus
Super User II
Super User II

Hi @illmatic,

 

Adding an existing group should be possible by using the addroleassignment method. You can refer to the principalid and set a specific role, like contribute permissions.

 

Below is an example of that:

_api/web/roleassignments/addroleassignment(principalid=@{variables('GroupID')},roledefid=1073741827)

addroleassignment_powerautomate.png

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Users online (2,268)