I need to display all groups for the email address of a contact record. If
the email address exists only in 1 group, then it would be inefficient to
load all groups, then all members for each group in the entire domain,
which could have tens of thousands of groups and users.
On Wednesday, 11 July 2012 00:20:00 UTC+1, Alexandre Jacquet wrote:
>
> Uhmmm depends on what you need to do :-)
> On Jul 10, 2012 8:19 PM, "Gwyn Howell wrote:
>
>> Yeah, that's what I figured. It's extremely inefficient for what I need
>> to do.
>>
>> Thanks for your reply
>>
>> On Wednesday, 11 July 2012 00:17:19 UTC+1, Alexandre Jacquet wrote:
>>>
>>> I think you have to retrieve every group and query the users inside a
>>> group.
>>>
>>> For each group
>>>
>>> Search members
>>> On Jul 10, 2012 8:03 PM, "Gwyn Howell" wrote:
>>>
>>>> I am so sure that about 2 weeks ago I was using the following code
>>>> (python):
>>>>
>>>> client = gdata.apps.groups.client.**GroupsProvisioningClient(**
>>>> domain=DOMAIN)
>>>>
>>>> client.client_login(EMAIL, PASSWORD, SOURCE)
>>>> groups =
>>>> client.retrieve_groups('random**_email@random_domain.com<random_email@random_domain.com>',
>>>>
>>>> False)
>>>>
>>>> where the member_id (marked in red) did not belong to the google apps
>>>> domain. This makes sense, as you can add any email address to a group, so
>>>> it makes sense to be able to query what groups an outside email belongs to
>>>> within the google apps domain.
>>>>
>>>> Only, today when I run the same code, I am getting EntityDoesNotExist
>>>> errors, implying that the method only works for google apps email
>>>> addresses.
>>>>
>>>> Now, it is quite possible that I am mistaken, and I never queried the
>>>> api for non google apps email addresses, but considering I wrote a
>>>> considerable routine around this very concept (which is now utterly
>>>> broken!) I am pretty sure I had it working in my testing.
>>>>
>>>> I checked the docs to find the following ...
>>>> The required memberId (member_id **in Python) argument identifies the
>>>> ID of a hosted user for which you want to retrieve group subscriptions.
>>>> ... the key phrase being "hosted user".
>>>>
>>>>
>>>> Does anyone know if this is possible? And if not, a workaround would be
>>>> hugely helpful!
>>>>
>>>> Thanks in advance
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Google Apps Domain Information and Management APIs" group.
>>>> To view this discussion on the web visit https://groups.google.com/d/**
>>>> msg/google-apps-mgmt-apis/-/**KMGVtWa1yvMJ<https://groups.google.com/d/msg/google-apps-mgmt-apis/-/KMGVtWa1yvMJ>
>>>> .
>>>> To post to this group, send email to google-apps-mgmt-apis@**
>>>> googlegroups.com <[email protected]>.
>>>> To unsubscribe from this group, send email to google-apps-mgmt-apis+**
>>>> [email protected]<google-apps-mgmt-apis%[email protected]>
>>>> .
>>>> For more options, visit this group at http://groups.google.com/**
>>>> group/google-apps-mgmt-apis?**hl=en<http://groups.google.com/group/google-apps-mgmt-apis?hl=en>
>>>> .
>>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google Apps Domain Information and Management APIs" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/google-apps-mgmt-apis/-/bWAA0lJL9h0J.
>> To post to this group, send email to
>> [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/google-apps-mgmt-apis?hl=en.
>>
>
--
You received this message because you are subscribed to the Google Groups
"Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-apps-mgmt-apis/-/IDhGlzrCR1wJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-apps-mgmt-apis?hl=en.