0

The People API with 'me' is supposed to give organizations. But found that the organizations comes from user entered Google plus.

I want to find current logged in users Organization Unit under which the admin added them. I am building a Marketplace app, where based on if the user is teacher or a student, the functionality is allowed or restricted.

What is the best way to get this info?

MavWolverine
  • 846
  • 1
  • 9
  • 24
  • Easiest way to check users in org units is to check on your admin panel. If you want to check through API, Using admin sdk Users: list(https://developers.google.com/admin-sdk/directory/v1/reference/users/list) in the query parameter, you can give "orgName" which displays user and their org unit. Also, check this link http://stackoverflow.com/questions/16975052/how-to-get-all-users-in-one-organization-unit-using-google-directory-api – SGC May 08 '15 at 21:26
  • I am developing an app for schools that use Google Apps. I don't think schools would be ok giving my app admin SDK access. – MavWolverine May 11 '15 at 02:44
  • @MavWolverine, in order to pull this information, you'll need access to the Directory API within the Admin SDK. That being said, your scopes should be limited to only the aspects you need to run your tool. If this is purely pulling information, you can even limit this further to only request readonly access. – miketreacy May 15 '15 at 19:42
  • If subdomains are used for classification, I get the domain name in the user api response. Then why is OU information hidden within admin sdk? Shouldnt it be part of the user api? – MavWolverine May 21 '15 at 04:18

0 Answers0