Google Directory API returns Not Authorized when call users().list().execute()

后端 未结 4 1287
孤独总比滥情好
孤独总比滥情好 2020-12-17 05:06

I need to read the list of users (and groups) from my google domain.

So I went to my Google APIs Console and enabled Admin SDK and created a

4条回答
  •  北海茫月
    2020-12-17 05:30

    you can go to "security" settings in the admin console (admin.google.com/AdminHome?chromeless=1&pli=1#SecuritySettings:); then click on advance settings > Manage third party OAuth Client access. After this map your client id(generated from appconsole code.google.com/apis/console under API access for oath2) and "One or More API Scopes". Use comma separated scopes as mentioned there. For google directory you can use https://www.googleapis.com/auth/admin.directory.group,https://www.googleapis.com/auth/admin.directory.user

    Hope after this it works :)

提交回复
热议问题