Problem with removing Group Members through the Web Service Client.

Jun 14, 2011 at 5:27 PM

RmResourceChanges changes = new RmResourceChanges(group)



new RmReference("urn:uuid:4254ffe3-c94e-48b5-9644-61f9d55aa96f"));



I can do the same thing with .Add and it works fine..

When I do the remove, I get an "Unable to dispatch request" error..

I have the permissions manually to do this in the portal... Only fails in the webservice call.

The problem seems to be that the removal is never really taking place and RmResourceChanges is coming back with 0 changes... Why the error is occuring..

Anybody have any idea... Been debugging the code and my eyes are going crazy... lol



Jun 14, 2011 at 7:47 PM

Hi Joe,

the problem is that the RmResourceChanges object computes differences based on how the object is defined when you call BeginChanges.

I cannot say if this is the case, as you are not showing how you created the group, but it could be that your group has no values in the ExplicitMember attribute. If so, removing a value has no effect on it, and on the RmResourceChanges object.

Try one of the following:

1) Get the group with a query (make sure that ExplicitMember is among the returned attributes).

2) Use this hack :)

RmReference member = new RmReference("urn:uuid:4254ffe3-c94e-48b5-9644-61f9d55aa96f");

Hope this helps,

Jun 14, 2011 at 7:53 PM

This is what I was using:

DefaultClient client = new DefaultClient();

RmGroup group = null;


String filter = String.Format("/Group[{0} = '{1}']", RmResource.AttributeNames.DisplayName.Name, groupDisplayName);


foreach (RmResource resource in client.Enumerate(filter))



group = resource as RmGroup;




Jun 14, 2011 at 7:58 PM

Looks like there is a problem in getting the group itself, it only wants to grab 1 member and there are 2 members..

So when its passing the group.. it doesn't see the other member. 

Jun 14, 2011 at 8:01 PM
Edited Jun 14, 2011 at 8:03 PM
try with:
RmResourceChanges changes = new RmResourceChanges(group)


group.ExplicitMember.Remove(new RmReference("4254ffe3-c94e-48b5-9644-61f9d55aa96f"));


Jun 14, 2011 at 8:03 PM

Yes that works.. but why am I only getting 1 member returned with the group... I should be getting 2..

I would rather have an api that works instead of having to hack it.

Thanks though... :)

Jun 14, 2011 at 8:11 PM

Just double-checked... Group has 2 members..

Its only grabbing the first one.

Is there a code update to grab all members for the group?

Jun 15, 2011 at 7:06 AM

Hi Joe,

the code does retrieve all the members of the group if everything is configured correctly, so the problem is somewhere else...

I see you are getting the group by display name, which is not guaranteed to be unique, and in your foreach loop there's a break statement; are you sure that the query is returning only one object, and that you are getting the correct one?




Jun 15, 2011 at 5:06 PM

There is only 1 group in this environment, so there is no need to worry about uniqueness.

Jun 15, 2011 at 5:23 PM
Edited Jun 15, 2011 at 5:25 PM

Looks like I found the issue.


If this is not called before you make the call to pull the group info.. multivalues break..


Jun 15, 2011 at 5:43 PM

Maybe we should put this in the constructor for the client so other people don’t make the same mistake.


From: steponz [email removed]
Sent: Wednesday, June 15, 2011 10:23 AM
Subject: Re: Problem with removing Group Members through the Web Service Client. [fim2010client:261366]

From: steponz

Looks like I found the issue.


If this is not called before all other calls, Mutlivalues break.......................

Jun 15, 2011 at 6:18 PM

Exactly what I was thinking..   ;)