Skip to main content

Greetings.  I would like to add multiple users to a SharePoint group with the SharePoint User Management wizard.  I have a SharePoint list that contains Location and UserName.  Each location can have multiple users, i.e:


Location 1     DOMAINUser1
Location 1     DOMAINUser2
Location 2     DOMAINUser3
Location 3     DOMAINUser4


Ideally, I would like to pass in the UserName property from a SmartObject GetList method that is mapped to the SharePoint list that contains the location information but it looks like the SharePoint User Management event wizard does not support SmartObject method properties.  My next approach was to first use a SmartObject event to execute the GetList method and store the UserName property in a repeating process XML field.  I then use this XML node in the 'Login Name' field in the SharePoint User Manager wizard to assign to the group.  This works great if there is only one user returned for the location (i.e. if I load 'Location 2' in the example above it will add User3 successfully to the group).  But if the XML node contains more than one person, Location 1 above for example, I receive errors stating that the 'User/Group does not appear to be discoverable'. 


Any ideas on how to add multiple users to a SharePoint Group without writing code?  Thanks.

Hi Eric.

Just an idea, might you try using the Advanced Destination Rules | Plan Per Slot (no destination) option of the destination rule. This basically works as a For-Each loop.  There is an example at the below link that shows it in action starting a dynamic number of IPCs based upon a repeating XML field:

   http://k2underground.com/blogs/fromthebench/archive/2008/10/22/using-a-repeating-xml-node-to-start-child-ipcs.aspx

I haven't tried using this specifically for your scenario, but I have used this feature in other areas where a For-Each would've been used in general coding practices, so perhaps it will work for you hear.


Thanks Bob but I'm not really concerned with Destination Users in this case.  I have an Activity without any client events at all and I just want to add multiple users to a SharePoint group.  From what I've found the SharePoint User Management event wizard doesn't support SmartObject properties or repeating XML nodes.  I'd love to be proven wrong though 😉
This particular destination rule option is used specifically when there are no destination users client events..  It is merely a way to spin up multiple instances of the activity based upon a given set of data.  Then each activity instance could potentially insert the record via the event wizard.

Yes, yes..... I was actually just reading the article you posted and I'll definitely give this a shot.


Thanks Bob.  This worked as advertised.  I'm not thrilled with the extra overhead of the IPC calls just to add users to a SharePoint Group but I suppose that is the tradeoff for not having to write code.  Thanks again.
Glad to hear it is working Eric.  I didn't necessarily mean to imply that you needed to use IPC.  This destination rule option is just a way to simulate a For-Each and the example happens to show it being used with an IPC event; I would suspect you could eliminate the IPC and instead use the desired user mgmt event directly in this activity. 

I actually tried to just use the SharePoint User Management event wizard in the same activity where I set the Destination Rule first.  When I did that I received errors stating that the user/group was not discoverable even though the process XML data clearly showed the proper user information (i.e. denallixob, denallixjeff, etc.).  When I moved it to an IPC event it worked however.  Perhaps I misconfigured something and I should revisit.  Thanks again.

Reply