Retrieving Organization Users -- Login Information

41 views
Skip to first unread message

Dan Lines

unread,
Aug 11, 2011, 2:46:16 PM8/11/11
to google-app...@googlegroups.com
When retrieving organization users is also possible to return the user's login information? (specifically whether the user is an admin or suspended)

Here is what is returned when retrieving a set of organization users:

<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns:atom='http://www.w3.org/2005/Atom' xmlns:apps='http://schemas.google.com/apps/2006'>
  <entry>
    <apps:property name="orgUserEmail" value="l...@example.com" />
    <apps:property name="orgUnitPath" value="new_york/hr" />
  </entry>
  <entry>
   ...
  </entry>
   ...
</feed>
Here is what is returned when retrieving a user (calling service.RetrieveUser(user_name)):
<?xml version="1.0" encoding="UTF-8"?>
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:apps="http://schemas.google.com/apps/2006"
  xmlns:gd="http://schemas.google.com/g/2005">
    <atom:id>https://apps-apis.google.com/a/feeds/example.com/user/2.0/SusanJones</atom:id>
    <atom:updated>1970-01-01T00:00:00.000Z</atom:updated>
    <atom:category scheme="http://schemas.google.com/g/2005#kind"
        term="http://schemas.google.com/apps/2006#user"/>
    <atom:title type="text">SusanJones</atom:title>
    <atom:link rel="self" type="application/atom+xml"
        href="https://apps-apis.google.com/a/feeds/example.com/user/2.0/SusanJones"/>
    <atom:link rel="edit" type="application/atom+xml"
        href="https://apps-apis.google.com/a/feeds/example.com/user/2.0/SusanJones"/>
    <apps:login userName="SusanJones" suspended="false" admin="false" changePasswordAtNextLogin="false" agreedToTerms="true"/>
    <apps:name familyName="Jones" givenName="Susan"/>
    <gd:feedLink rel="http://schemas.google.com/apps/2006#user.nicknames"
    href="https://apps-apis.google.com/a/feeds/example.com/nickname/2.0?username=Susy-1321"/>
    <gd:feedLink rel="http://schemas.google.com/apps/2006#user.groups"
    href="https://apps-apis.google.com/a/feeds//group/2.0/?recipient=us-s...@example.com"/>
</atom:entry>
The above information that is in bold is what I would like to also receive when retrieving an organization user.  Otherwise I need to make two calls for all the information needed...one to retrieve the users organization unit and one to retrieve the users login information....
Thanks for checking this post out.
- Dan

Mally Mclane

unread,
Aug 11, 2011, 3:11:57 PM8/11/11
to google-app...@googlegroups.com


On Aug 11, 2011 7:46 PM, "Dan Lines" <dli...@cloudlock.com> wrote:
>
> When retrieving organization users is also possible to return the user's login information? (specifically whether the user is an admin or suspended)

Dan

Would the google admin audit API help you here?

Mally

> --
> 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/-/S5OOx2UJrmgJ.
> To post to this group, send email to google-app...@googlegroups.com.
> To unsubscribe from this group, send email to google-apps-mgmt...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-apps-mgmt-apis?hl=en.

Dan Lines

unread,
Aug 12, 2011, 3:50:16 PM8/12/11
to google-app...@googlegroups.com
I just checked out the Admin Audit API.  Although it does have some interesting information like tracking suspend/unsuspend actions
per administrator this is not what I am looking for.

What am I looking for is a way to know if an organization user (a user returned from when retrieving a set of organization users) is suspended and if the user
is an admin.  I'd like to do this in one API call for performance reasons.

- Dan

Robert Norris

unread,
Aug 12, 2011, 6:14:37 PM8/12/11
to google-app...@googlegroups.com
No, there's not - you'll have to make separate calls.


--

Gunjan Sharma

unread,
Aug 13, 2011, 7:47:47 AM8/13/11
to google-app...@googlegroups.com
Hi Dan

Currently we don't support a single call two retrieve both the Login Information as well as the Organization Unit. You need to issue two different auth tokens to do both the jobs individually.

Thanks 
Gunjan
--
Regards
Gunjan Sharma
Developer Programs Engineer

Reply all
Reply to author
Forward
0 new messages