cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
w0rmsp17
Frequent Visitor

Assistance with Adding a user to a Group

Hello gang,

 

I've been looking for solutions online to automatically add a user to a SharePoint 'Group' in the onboarding phase of my flow.

I'm attempting to do this with the 'Send an HTTP request to SharePoint' module. This is designed to allocate users access to their department SharePoint page based on the permissions I've established.

 

HTTPrequest2.png
error message

HTTPrequest.png

I'm new to this, So I'm trying to make sense of this error I'm getting when testing this function.

- If someone could assist me in finding where to point the 'URI' address.HTTPrequest4.png

And how to validate this is the correct url addr.

- As well as how to find the group id (is that found in the url in the 'site permissions' (HTTPrequest3.png)

- In the 'Body' Am I correct in the assumption that this requires the {'type':'SP.User'} (referring to Share point user) And their associated 'LoginName'.

- And why I'm getting an invalid type response when I run this function. 

 

Any help will be greatly appreciated

 

thank you 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

Hi @w0rmsp17 ,

 

You need to add two underscores in front of the metadata instead of one.

Please refer to this similar thread and see if it helps:

https://powerusers.microsoft.com/t5/Building-Flows/Adding-users-to-a-SharePoint-Group/m-p/309811

In addition, you could refer to the SharePoint Rest API. Basically, all configuration of the body needs to start with __metadata, not _metadata.

 

Please try again.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-bacao-msft
Community Support
Community Support

 

Hi @w0rmsp17 ,

 

You need to add two underscores in front of the metadata instead of one.

Please refer to this similar thread and see if it helps:

https://powerusers.microsoft.com/t5/Building-Flows/Adding-users-to-a-SharePoint-Group/m-p/309811

In addition, you could refer to the SharePoint Rest API. Basically, all configuration of the body needs to start with __metadata, not _metadata.

 

Please try again.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Worked!

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,117)