sting1999
2009-04-11 08:38:26 UTC
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
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