Hey,
I want to fetch a list of all google workspace users using a service account using a API call or postman.
Can you please give me the instructions on how to do it? Thank you
You can do this with the free, open source, command-line, indispensable GAM tool. Check out:
for more details.
Specifically, the command would be gam print users
And, since GAM is open-source, you can have a look in its code to see exactly how it's done.
Hope that helps,
Ian
From where can i give the service account scopes/permissions to call the google Admin/some other services API
Youโd set which APIs are active and access permissions via your project in the Google Cloud Console. Thereโs a good guide at https://developers.google.com/workspace/guides/get-started