cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate III
Advocate III

Flow to add user to old school SP People and Groups using REST API?

Has anyone had any luck adding user to an old school People and Groups with Flow?

 

I'm assuming all the connectors for Azure and O365 focus on Office 365 groups, not permission groups. Google is clogged with results for Office 365 groups, so not having any luck there.

 

Am thinking HTTP request and SharePoint REST API:

https://msdn.microsoft.com/en-us/library/office/dn531432.aspx?f=255&MSPPError=-2147217396#bk_UserCol...

 

POST request example: Add a user to a group

  url: "<app web url>/_api/SP.AppContextSite(@target)/web
    /sitegroups(7)/users
    ?@target='<host web url>'",
  method: "POST",
  body: "{ '__metadata': { 'type': 'SP.User' }, 'LoginName':'i:0#.w|domain\\user' }",
  headers: {
    "accept": "application/json; odata=verbose",
    "content-type": "application/json; odata=verbose"

 

group.PNG

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Advocate III
Advocate III

less painful than i thought it would be:

 

addusertogroup.PNG

View solution in original post

5 REPLIES 5
Highlighted
Advocate III
Advocate III

less painful than i thought it would be:

 

addusertogroup.PNG

View solution in original post

Highlighted

So what user is added with this flow? 

Is it connected to a list, or the user that creates an item?

How to connect this action with a contact list and add a member by his email address (when an item is created) in the permission group?

Highlighted

Hi All,

 

I am able to add the user to to SP Group using flow, how to remove user from the SP group using flow please help me 

Highlighted

Can you please let me know how you added users to group through flow



 

Highlighted

@bdc604 ,

What is in the LoginName variable?

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

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.

Users online (12,788)