cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Field
Level 8

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

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

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

Field
Level 8

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.


 

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
Field
Level 8

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

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/

Field
Level 8

Re: Change Permissions of a Page

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

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,892)