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

后端 未结 4 1290
孤独总比滥情好
孤独总比滥情好 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:42

    I had the exact same problem, and was stucked on this sample

    What helped me : 1/ I did not Delegate domain-wide authority to your service account, as suggested by Jay Lee. But after that, I still had the problem. 2/ Then, according to this post, the call to setServiceAccountUser(yourAdminAccount@yourDomain.com) is mandatory.

提交回复
热议问题