cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
crirojsab
Helper I
Helper I

Sharepoint error - Access Denied

Hello I'm trying to create a flow and the idea as that every time someone enter specific information in a sharepoint list this allows the option add users in specific groups in sharepoint (Image Below). However everytime that is executed get the next error: 

 

Access denied. You do not have permission to perform this action or access this resource.
clientRequestId: 195fa1a2-8769-4213-b29f-43c20d1ab1e2
serviceRequestId: 8efcc49f-105f-b000-fc46-6b4f11ad1c8b

 

crirojsab_0-1620236217605.png

The user that execute and add data in the list is an admin of the sharepoint site and also the owner of the job.

 

Any idea of why this job is failing? 

 

Thanks and regards

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
jinivthakkar
Super User
Super User

@crirojsab I just tried this and it worked fine for me, give it a try

jinivthakkar_0-1620402341742.png

 

jinivthakkar_1-1620402394919.png

22 is groupId as highlighted in image 2 and passed in image 1 uri - _api/web/sitegroups(22)/users

 

accept - application/json;odata.metadata=none

content-type - application/json

 

Body - {'LoginName':'i:0#.f|membership|User1@tatatiago.onmicrosoft.com'}

 

Reference - https://emadgabriel.com/2019/01/04/microsoft-flow-add-user-to-sharepoint-group/

--------------------------------------------------------------------------------

If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

 

View solution in original post

jinivthakkar
Super User
Super User

@crirojsab you might be hitting a wrong end point hence you are getting the access denied error.

View solution in original post

3 REPLIES 3
jinivthakkar
Super User
Super User

@crirojsab I just tried this and it worked fine for me, give it a try

jinivthakkar_0-1620402341742.png

 

jinivthakkar_1-1620402394919.png

22 is groupId as highlighted in image 2 and passed in image 1 uri - _api/web/sitegroups(22)/users

 

accept - application/json;odata.metadata=none

content-type - application/json

 

Body - {'LoginName':'i:0#.f|membership|User1@tatatiago.onmicrosoft.com'}

 

Reference - https://emadgabriel.com/2019/01/04/microsoft-flow-add-user-to-sharepoint-group/

--------------------------------------------------------------------------------

If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

 

View solution in original post

jinivthakkar
Super User
Super User

@crirojsab you might be hitting a wrong end point hence you are getting the access denied error.

View solution in original post

crirojsab
Helper I
Helper I

Hi @jinivthakkar you have right as just did what you suggest expecting a different result but was the same; and if works for you should be the same here. Now I'm completely sure that something happened. Now I'm going to contact my IT department. 

Regards!. 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (1,283)