0

I have GSuite Service Account and My app uses following scopes (these are working fine) :

https://www.googleapis.com/auth/admin.directory.customer.readonly,https://www.googleapis.com/auth/admin.directory.user.readonly,https://www.googleapis.com/auth/admin.directory.domain.readonly,https://www.googleapis.com/auth/drive.readonly,https://www.googleapis.com/auth/drive.metadata.readonly,https://www.googleapis.com/auth/drive.photos.readonly

Now I Have to access gsuite groups, As mentioned here in api documentation : https://developers.google.com/admin-sdk/directory/v1/reference/groups/list

I Added these two scopes :

https://www.googleapis.com/auth/admin.directory.group.readonly, https://www.googleapis.com/auth/admin.directory.group

in my already existing scopes, and I'm unable to authorise my application now.

When I try to check this via api explorer in the above link, It throws an error : 400 - Bad Request. But the strangest thing happen, it returned 200 ONCE only while trying and returned the group I created, But I'm unable to make successful call again and keeps getting error.

Is there anything I'm missing here? Any help will be really appreciated. Thanks.

NOTE: I can access gsuite users with above scopes as well, the issue is only with the groups.

ShahtajK
  • 117
  • 10

1 Answers1

0

As is mentioned on the documentation, 400 error is not related to the scopes that you are using. However the explorer API information is not correct as the "Customer" field is required, You can try it typing my_customer on that field and you should get a 200 if your user has the proper permissions.

I have submitted a request to update the current documentation.

jds1993
  • 218
  • 1
  • 5