I realise this is actually a Sharepoint issue rather than a Nintex one, but i'm hoping someone here will have experienced this problem and have some idea of the cause.
I need to check if the current workflow user is a member of a named group. As there is no builtin Nintex function for this (a surprising omission) I went searching and found a recipe for writing a Nintex UDA (User defined Action) to do this. The solution is essentially the same as described in this thread.
The Nintex action seems to function as expected, but the underlying Sharepoint web service query (GetGroupCollectionFromUser) is consistently returning an empty set of groups, whichever user login name I query on.
Checking the basics-
- The user ID i'm searching for is valid (I have tried my own and others, all of which are members of multiple groups). Note if the user ID isn't valid for the site the web service query generates an error.
- The username and password being used for the web service call are valid for the site and have site collection admin privileges.
- The web service is responding, but even if I run the query manually and hard-code in my own user ID (I'm a member of about 5 groups) the response I get in raw XML form is-
<GetGroupCollectionFromUser xmlns="http://schemas.microsoft.com/sharepoint/soap/directory/"><Groups /></GetGroupCollectionFromUser>
Notice the empty <Groups /> element.
Has anyone seen this before and found the cause? Any hints much appreciated.