Third Light Developer Exchange

Code and templating community forum for developers and software integrators

You are not logged in.

Announcement

If you wish to join the Developer Exchange, please contact your account manager - this is to avoid unnecessary spam in the forums. Many thanks for your understanding.

#1 2020-04-30 17:28:48

NGG
Member
Registered: 2020-04-27
Posts: 3

Unable to add a Member to a Group (Space)

I'm working to add a Member to a Group (aka - Space) using the "Groups.AddMembers" action, and receiving a "MEMBER_NOT_FOUND" response for a known valid user Guid and known valid Group Guid. I've also attempted the same action while authenticated with a valid Manager of that Group and received the same result.

Is there something special needed when passing in parameters to "Groups.AddMembers"? What am I missing here?

Body:
{ action = "Groups.AddMembers", apiVersion = "1.0", sessionId = "HIDDEN", inParams = { groupId = "HIDDEN", memberGuids = ["HIDDEN"] } }


Related Metadata:
sessionTrackingId\":\"afa3e20a-0de4-4d39-ac33-f21b41f333c6\",\"correlationId\":\"80beb00b-f0fb-447c-891e-7ea4fd22d208\"

Offline

#2 2020-05-01 15:49:00

steve
Third Light Staff
Registered: 2013-06-06
Posts: 92

Re: Unable to add a Member to a Group (Space)

Hi Neil,

The structure of your request looks okay so it is possible that the values you are supplying are incorrect in some way. To help confirm that, work backwards and manually create a space with a test user and then use      Groups.RemoveMembers() with the guid of the user to confirm the validity of the supplied guid.

You might also try supplying the user id rather than the guid to Groups.AddMembers/RemoveMembers just on the off-chance that your script is in a mode that is looking for the old form of input.

Best Regards,
Steve

Offline

#3 2020-05-01 19:25:28

NGG
Member
Registered: 2020-04-27
Posts: 3

Re: Unable to add a Member to a Group (Space)

Thank you for the feedback. I implemented the Groups.RemoveMembers method, created a new User within the Space, and am experiencing the same result. I also attempted authenticating with the Space Manager, no luck. Also attempted swapping out the Id for the Guid on both groupId and memberGuids, no luck. Also attempted to pass a single Guid instead of an Array.

Any other suggestions?

Offline

#4 2020-05-04 11:54:02

steve
Third Light Staff
Registered: 2013-06-06
Posts: 92

Re: Unable to add a Member to a Group (Space)

Hi,

It's possible that deferrencing the correct guid is the issue here. This is how we would establish the correct values to use:

1) Use Groups.GetMembers supplying an argument of the space guid

This will return the guids of the ROLES within the space, not the users.

2) Now run Groups.GetMembers again but this time supply a role guid.

That should then return the guids of the USERS.

3) Finally, use Groups.RemoveMembers with arguments like this:

groupId =>  role_guid_from_1
memberGuid => user_guid_from_2

So basically a role is a member of a space and a user is a member of a role. For this case Groups.RemoveMembers or Groups.AddMembers needs to be scoped to the role rather than the space.

Best Regards,
Steve

Offline

#5 2020-05-04 17:54:35

NGG
Member
Registered: 2020-04-27
Posts: 3

Re: Unable to add a Member to a Group (Space)

Okay - looks like that did the trick. I've succeeded with a Groups.RemoveMembers call based on that direction. Is there an API call that allows a query with Role Names? It's impossible to tell which Role we're dealing with based on the Role Guid.

Thanks for the guidance!

Offline

#6 2020-05-05 13:11:55

steve
Third Light Staff
Registered: 2013-06-06
Posts: 92

Re: Unable to add a Member to a Group (Space)

Role names can be verified by the use of Groups.Get and then filtering on the output of 'name'

Best Regards,
Steve

Offline

Board footer