Nintex Workflow – Get Site Admins

There are probably numerous ways of getting a list of Site Admins.

I found one way would be to call the SiteData.asmx web service, provided in SharePoint.  More specifically, the GetSite web method.  When looking at calling a web method in a web service, pay special attention to the parameters the method takes.

In this case, the GetSite web method doesn’t take any input parameters.  It only has output parameters.

The Call Web Service action in Nintex Workflow doesn’t support output parameters.  So in order to get that data, we’ll need to use the Web Request action.  It’s a slightly lower-level action, in that it doens’t build the SOAP packet for you.  Instead, you’ll need to do that yourself.  But that is actually quite straightforward, if you can look at the web method in IE.

Nintex Workflow – Get Site Admins – Vadim Tabakman

Web Request

As you can see from the screenshot above, it’s not overly complicated.

I can go into more details about the workflow itself, but I’ve tried to make each action have a decriptive bottom label.  So I don’t think it needs much explanation.  If you have an questions, feel free to post it on here as a comment or email me.

Below, you’ll find a number of downloads.  The first is a workflow that does all the work of calling the web service and parsing the results.

The next 2 files are identical, just different types of files for the same thing (User defined action).  This UDA takes one input parameter (site url) and one output parameter (type – Collection).  If you were to import this UDA and promote it to a Farm UDA, it should be usable by any workflow in your farm.

The last file is a workflow that calls the UDA.

Conclusion

The Web Request action uses a constant I have called “Farm Admin”.  You will need to update the action to use credentials you provide, or a consant you have.

If you promote the User Defined Action to the farm, make sure you have a Farm wide constant that the Web Request action can use.  It’s not recommended to put credentials into the action itself (it’s not secure).

Downloads

Nintex Workflow 2010 : v2.3.7.0

Download Files

Leave a Reply

Your email address will not be published. Required fields are marked *