Vignesh Bayari R.
Vignesh Bayari R.

Reputation: 663

Is there a way to search from the list of groups in a domain by a non-admin user?

The Directory API throws a 'Not Authorized to access this resource/api' error when I try to list the groups in a domain as a non-admin. But gmail autocompletes the group names (which means it is able to retrieve the list of groups) for non-admin users as well. Is there a way to get the list of groups or search from the list of groups in a domain without being an admin?

Upvotes: 1

Views: 158

Answers (1)

MαπμQμαπkγVπ.0
MαπμQμαπkγVπ.0

Reputation: 6737

The best way to do if you are not an admin user, is to impersonate the admin by using a service account. You need to enable domain-wide delegation for your service account to impersonate a domain admin when making a request. See this SO post and another discussion for this github post.

Upvotes: 1

Related Questions