oauth2-google icon indicating copy to clipboard operation
oauth2-google copied to clipboard

Cannot access customers informations because I'm not admin.

Open VincentLanglet opened this issue 2 years ago • 1 comments

I saw the following issues about groups: https://github.com/thephpleague/oauth2-google/issues/86

When connecting to google with oauth, I added the scope

https://www.googleapis.com/auth/admin.directory.customer.readonly

Then I try to access to

'https://admin.googleapis.com/admin/directory/v1/customers/my_customer'

I'm getting an error Not Authorized to access this resource/api. According to some research, it seems like that the api can only be requested by admins. (I tried with an admin and it works). If I want to do it with a non-admin user, it require impersonating https://developers.google.com/admin-sdk/directory/v1/guides/delegation#python

How is this supported with this library ? @shadowhand

VincentLanglet avatar Jun 02 '22 10:06 VincentLanglet

This seems out of scope/support request for Google's API rather than anything this library is responsible for.

bradjones1 avatar Nov 16 '22 22:11 bradjones1