I am looking for a way to get from any google apis a list of not-suspended users in an organization, using oath authorization.
google profile api has oauth, but the user list returned does not contain the isSuspended flag.
google provisioning api returns isSuspended flag, but as far as I understand cannot be OAUTH authorized.
are there any other options I have to accomplish this?
Yes, the Provisioning API works with OAuth 1.0 and 2.0. See the docs and necessary scopes here.
If you just need all users in the entire Google Apps instance, use the retrieve all users in all domains API call and then filter out users with
isSuspended = True
.If you also need to filter the list down to users under a certain organizational unit (OU), use the Retrieving An Organization Unit's Immediate Sibling Users API call also and then filter down your list to users who are in the OU and are not disabled.