You can easily accomplish this using the Google Admin API, you just need to make sure you’re requesting access to the scopes you need access to (you have to request for access and Google has to approve the use case)