简体   繁体   中英

how to get suspended user status from google api using oauth

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM