Login to Google Cloud Directory Sync (GCDS).
Click on Security -> Access and data control -> API Controls from the navigation menu.
Click on MANAGE DOMAIN WIDE DELEGATION in the Domain wide delegation pane.
Click Add new.
In the Client ID field, enter the Client ID obtained from the service account creation steps. For more details, see Creating a Service Account.
In the OAuth scopes (comma-delimited) enter a comma-separated list of the following:
https://www.googleapis.com/auth/admin.directory.user
https://www.googleapis.com/auth/cloud-platform
https://www.googleapis.com/auth/admin.directory.group
https://www.googleapis.com/auth/admin.directory.group.member
https://www.googleapis.com/auth/admin.directory.rolemanagement
Note:
The scope above is needed only if a super admin role has been granted.
https://www.googleapis.com/auth/admin.directory.customer.readonly
https://www.googleapis.com/auth/admin.directory.domain.readonly
Click AUTHORIZE.
For more details, see Delegate domain-wide authority to your service account.