Note: Images serve as a reference; button appearances and locations may change.
Step 1: Create and configure a service in Google Cloud Console
- Navigate to “console.cloud.google.com/”
- Search “New project” in the search bar and select “Create a project”
- Select that project by clicking on the project picker
- Navigate to API and Services and click on “Enabled APIs and Services”
- Search for “admin sdk api”
- Enable “Admin SDK API"
- Enable “Cloud Identity”
- Navigate to credentials
- Click on “Manage service accounts”
- Click on “Create Service Account”
- Open the service account and navigate to “Keys”
- Click on “Add Key” and “Create a new key”
- Create new JSON Key and save it for future use
- Navigate to Details>Advance Settings and copy Client ID
Step 2: Grant API permissions to this service application from Google Admin Console.
- Navigate to "admin.google.com"
- Click on Security > Access and data control > API control
- Navigate to Manage domain-wide delegation
- Click on Add new (Api Clients)
- Enter Client ID
- Enter the required 0Auth scopes
- https://www.googleapis.com/auth/admin.directory.device.mobile.readonly
- https://www.googleapis.com/auth/admin.directory.device.chromeos
- https://www.googleapis.com/auth/admin.reports.audit.readonly)
- Copy the customer ID
- Navigate to Account> Account Settings
- Copy the customer ID