Hi Sting,

There is no single call to the server that can determine the account
type. The steps you have listed are the best way of determining the
account type.
If you can explain your use case , may be we can optimize the process
and reduce the number of calls in your algorithm.

-Anirudh

On Apr 11, 1:38 pm, sting1999 <[email protected]> wrote:
> Hi All,
>
> Does anyone know a clean way to find out whether an account is a
> Google Apps user or group?
>
> Here is a messy solution because there may be potentially 3 calls to
> get the answer:
> 1. query the UserService.query() for the userEntry
> -return a user or throw an exception
> 2. if the #1 throw an exception, query GroupService.retrieveGroup()
> -return a group or throw an excepton
> 3. if #2 throw an exception, there is no such account.
>
> Is there an API that will the account type or exception in just one
> call to the server?
>
> Thanks,
> Sting
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Apps APIs" group.
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-apis?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to