cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Web service- GetGroupCollectionFromUser returning no groups

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-

  1. 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.
  2. The username and password being used for the web service call are valid for the site and have site collection admin privileges.
  3. 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.

Regards: colin_e

Labels: (3)
Tags (1)
0 Kudos
Reply
8 Replies
fhunth
Nintex Newbie

Re: Web service- GetGroupCollectionFromUser returning no groups

Reply
Not applicable

Re: Web service- GetGroupCollectionFromUser returning no groups

That's essientially the method i'm using, but the problem is the reply from the web service is always an empty set of groups.

My best guess as to what might be causing this would be permissions, but as i indicated above I have given the user ID that i'm using for the web service request Site Collection Admin rights, so it's hard to see that this user would be blocked from reading any group memberships.

I'm going to have a full run through the permissions settings for the user and the groups looking for any options I have missed, but at the moment it's making me scratch my head.

Reply
fhunth
Nintex Newbie

Re: Web service- GetGroupCollectionFromUser returning no groups

Please take a look at the Sharepoint group settings. There is a setting that says that members are shown only to group's members. Perhaps you have it set in that way.

Reply
bamaeric
Nintex Newbie

Re: Web service- GetGroupCollectionFromUser returning no groups

Hi Colin.  Did you ever get this one figured out?

Reply
Not applicable

Re: Web service- GetGroupCollectionFromUser returning no groups

No i'm afraid not.

Getting support requests through our ICT department to Nintex is difficult when it's a speculative piece of work rather than business-impacting, (which is the status of this) so for the moment it's sitting in the "unanswered question" pile.

I had to move on from this to other pieces of work, but one day I can imagine the issue coming up again and I'll still be stuck...

Reply
posea_than
Nintex Newbie

Re: Web service- GetGroupCollectionFromUser returning no groups

Hello,

If you're still interested in GetGroupCollectionFromUser, you may try it as below as it worked for me:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/">

   <soapenv:Header/>

   <soapenv:Body>

      <dir:GetGroupCollectionFromUser>

         <!--Optional:-->

         <dir:userLoginName>i:0#.w|domain\user.name</dir:userLoginName>

      </dir:GetGroupCollectionFromUser>

   </soapenv:Body>

</soapenv:Envelope>

Reply
Stonehage
Nintex Newbie

Re: Web service- GetGroupCollectionFromUser returning no groups

Hello!

This has bugged me as well. When I was running the webservice manually I could see some groups were being picked up but not all by a long way. On comparing groups that were appearing against those that weren't, one thing stood out.


For groups that were appearing, Site Permissions had something in it. IE Read. Those that weren't appearing were blank. As soon as I assigned a permission, they began to get picked up.

Capture.PNG

Hopefully that'll work for you as well.

Tony.

Reply
alexandredavid
Nintex Newbie

Re: Web service- GetGroupCollectionFromUser returning no groups

Thanks a lot for this tip ! I had an error 500 when trying to call GetGroupCollectionFromUser using loginName.

Reply