cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rolanddaane
Helper II
Helper II

change SharePoint group permissions from editor to contributor

Hi,
I'm trying to change the permissions of the group members from edit to contribute after a site is created.
I tries the below, but run into the error "Value does not fall within the expected range".

How can I change the permissions of a SharePoint group to contributor using the RESt api?

rolanddaane_0-1639476723292.png

 

2 ACCEPTED SOLUTIONS

Accepted Solutions

Hey Mate @rolanddaane 

 

The first step when testing an  REST API would be to use it in the browser and see it gives you a response -

 

CFernandes_0-1639490435553.png

Sample URL -

 

https://xxxxxx.sharepoint.com/sites/DemoData/_api/web/sitegroups/?$filter=((substringof(%27Owner%27,...

 

I have verified using Power Automate and it indeed return correct result -

 

CFernandes_1-1639490554430.png

 

Action Configuration -

 

CFernandes_2-1639490621639.png

 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

 

 

 

 

View solution in original post

@rolanddaane Please make sure you use /?$filter=((substringof(%27Owner%27,Title))) 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

View solution in original post

7 REPLIES 7
CFernandes
Super User
Super User

Hey @rolanddaane 

 

Please have a look at  - https://www.catapultsystems.com/blogs/use-power-automate-flow-to-change-sharepoint-group-permission-...

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

rolanddaane
Helper II
Helper II

Tried it and on the first part it fails with the error The expression "((substringof(‘Owner’,Title)))" is not valid.

Kyzivat
Helper I
Helper I

On the picture you've sent is GET method. You want POST, don't you? 🙂

Try to change that and let us know, I am changing rights in multiple FLOWS by HTTP Requests too, I may dig it up and see what is different.

Hey Mate @rolanddaane 

 

The first step when testing an  REST API would be to use it in the browser and see it gives you a response -

 

CFernandes_0-1639490435553.png

Sample URL -

 

https://xxxxxx.sharepoint.com/sites/DemoData/_api/web/sitegroups/?$filter=((substringof(%27Owner%27,...

 

I have verified using Power Automate and it indeed return correct result -

 

CFernandes_1-1639490554430.png

 

Action Configuration -

 

CFernandes_2-1639490621639.png

 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

 

 

 

 

rolanddaane
Helper II
Helper II

I see why it didn't work.
You have %27 instead of the ' 

Getting result now

rolanddaane_2-1639491322672.png

 



rolanddaane_1-1639491283659.png

 



rolanddaane_3-1639491408851.png

 

@rolanddaane Please make sure you use /?$filter=((substringof(%27Owner%27,Title))) 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

rolanddaane
Helper II
Helper II

Got it to work now! and I now add contribute and remove edit.
Thanks!

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (6,094)