cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Nintex Newbie

Get all users from multiple SharePoint groups and add to single collection

Is there a way to loop through the GetUserCollectionFromGroup web service operation and get all the users in multiple groups?   

 

I need to get all users into a single collection and build one string with them all in, then remove any duplicates.

Labels: (1)
0 Kudos
Reply
2 Replies
Highlighted
Automation Master
Automation Master

Re: Get all users from multiple SharePoint groups and add to single collection

@spenney ....try below steps:

 

  1. Use the web method "GetUserCollectionFromGroup"
  2. In web service output option, select "Specify elements"
  3. Expand everything in soap:Body and select "m:GetUserCollectionFromGroupResult
  4. Store the output in multi-line text variable, output is the XML file
  5. Using Query XML action, use above MLT variable as a source
  6. Use "/defaultNS:GetUserCollectionFromGroup/defaultNS:Users/defaultNS:User/@LoginName" XPath if you want logins or "/defaultNS:GetUserCollectionFromGroup/defaultNS:Users/defaultNS:User/@Name" to get names.

You can also get test XML from web service and use that to see what you want using XPath builder.

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Get all users from multiple SharePoint groups and add to single collection

Thanks kunalpatel

I was missing a join collection after the XML builder. Once the collection was joined I could then concatenate all the users into one string in order to count and de-duplicate them.
0 Kudos
Reply