AnsweredAssumed Answered

AddPermissionsCollection dynamic creation of permissionsInfoXML string

Question asked by duane on Jul 8, 2015
Latest reply on Jul 9, 2015 by duane

I need to dynamically add user permissions to a site. I will be using the AddPermissionsCollectionWebService:



<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soap="">


    <AddPermissionCollection xmlns="">








Essentially I need to build a dynamic XML string that would look something like this:



<User LoginName="i:0#.f|membership|"" Name="Test 1" Notes="Notes" PermissionMask="1011030767"/>

<User LoginName="i:0#.f|membership|" Email="" Name="Test 2" Notes="Notes" PermissionMask="1011030767"/>

<User LoginName="i:0#.f|membership|" Email="" Name="Test 3" Notes="Notes" PermissionMask="1011030767"/>




For the purposes of my current requirement, the permissions are the same for each user.


The users will be fetched from a Group/Person field in a list which will allow for multiple select (this field will be copied to a string variable as I don't seem to have the option to evaluate Person/Group field "is not empty"??). This field is not required, so this field could have 0,1 or many users assigned to it. I think the Run If command could be used, and must only run if the string var is not empty.


I'm would like some advice on how to build the dynamic list of users.


I have looked at some Nintex documentation on the internet: Tutorial: Adding users to a new team site: How to create a site then provision its users using a workflow

However it seems that O365 is missing the ItemProperty functionality which is critical to this examples implementation - is this true?


I know that I can get the users info by reading the ListItem Field and could use this to build the string, but I'm not sure how I would handle looping though the people assigned to the field...and also wonder if this is the best design approach.




My Requirement is not exactly the same as I need to concatenate the PermissionMask to each user's meta data.


Discussion/thoughts are welcome. I'm sure this problem has been solved before


Message was edited by: Duane Stavropoulos (fixed typo in email address)