cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

Change Permissions of a Page

Hello there,

 

In my sharepoint list "Pages", i added a column that is called "Audition" that is a User/Group column.

Whenever i want to create another page, i want to insert the only people/group that has access to that page.

 

Im trying to achieve this with flow, but flow doesn't have an "Change permissions" step.

 

Hw can I do this?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver I
Resolver I

Re: Change Permissions of a Page

Hi @Field,

 

This should be possible with the Send a http request to SharePoint action in combination with the SharePoint REST Api.

 

Serge Luca has a nice blogpost on this subject:

https://sergeluca.wordpress.com/2018/05/03/assign-unique-permissions-to-a-document-with-the-new-send...

 

In that example he's changing permissions for documents. But it should also be possible with pages.

View solution in original post

6 REPLIES 6
Highlighted
Resolver I
Resolver I

Re: Change Permissions of a Page

Hi @Field,

 

This should be possible with the Send a http request to SharePoint action in combination with the SharePoint REST Api.

 

Serge Luca has a nice blogpost on this subject:

https://sergeluca.wordpress.com/2018/05/03/assign-unique-permissions-to-a-document-with-the-new-send...

 

In that example he's changing permissions for documents. But it should also be possible with pages.

View solution in original post

Highlighted
Helper V
Helper V

Re: Change Permissions of a Page

Hi there,

 

When i follow is guide, i get this error:

The expression "lists/getByTitle(‘Pages’)/items(38)/breakroleinheritance(copyRoleAssignments=false,clearSubscopes=true)" is not valid.


@Expiscornovus wrote:

Hi @Field,

 

This should be possible with the Send a http request to SharePoint action in combination with the SharePoint REST Api.

 

Serge Luca has a nice blogpost on this subject:

https://sergeluca.wordpress.com/2018/05/03/assign-unique-permissions-to-a-document-with-the-new-send...

 

In that example he's changing permissions for documents. But it should also be possible with pages.


 

Highlighted
Resolver I
Resolver I

Re: Change Permissions of a Page

Hi @Field ,

 

Is it by any chance the default SitePages list? 

 

You could also retrieve the list guid and try and use that for the REST api call, like this example:

"lists(guid'6853ac4c-286c-4150-b846-15ec76280cfe')/items(38)/breakroleinheritance(copyRoleAssignments=false,clearSubscopes=true)

Highlighted
Helper V
Helper V

Re: Change Permissions of a Page

Hi @Expiscornovus ,

 

I have figured out my problem.

The flow you shown as an example is for one user only. But i am trying to user several users/Groups.

When i call the column i use to get the users, flow automatically uses a For Each to get each user/group, and therefor, im unable to get the variable.

InkedScreenshot_2019-06-14 Create your flow Microsoft Flow(1)_LI.jpgScreenshot_2019-06-14 Create your flow Microsoft Flow.png

Highlighted
Resolver I
Resolver I

Re: Change Permissions of a Page

Hi @Field,

 

Maybe it's an idea to make your variable of type array instead of string since it can contain multiple values?

 

Pieter Veenstra has a nice blog about arrays:

https://veenstra.me.uk/2018/07/10/microsoft-flow-shed-some-light-on-arrays/

Highlighted
Helper V
Helper V

Re: Change Permissions of a Page

I have tried with an array and still shows me an error.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Come join us today! Find your favorite faces from the community presenting at the Power Platform Community Conference!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Users online (5,329)