Use cases → Admin and governance
Update the company-wide contact directory with a service account
Keep the organisation’s shared contacts current by updating the Directory API using a delegated service account, avoiding manual edits and inconsistencies.
| Who it is for | IT admins responsible for maintaining up-to-date staff and external contacts in Google Workspace. |
|---|---|
| APIs | Admin SDK |
| Typical scopes | admin.directory.user, admin.directory.customer |
The problem
Manually updating the directory leads to inconsistent information and stale entries, especially after onboarding, offboarding, or department changes. Automating this with delegated access ensures changes are applied uniformly across the organisation.
How it works
- Grant the service account domain-wide delegation for the necessary Directory API scopes.
- Sync your source of truth (such as HR or CRM systems) with Workspace directory data.
- Update user and shared contact profiles via the Admin SDK, matching on unique identifiers.
- Log each update and compare post-API state to detect mismatches or errors.
What changes
Directory data stays synchronised with your source system, reducing manual errors and ensuring all users see accurate contact details.
Questions people ask
How do I know when updates have actually propagated?
There’s no event or webhook for propagation; empirically, changes are visible in the UI after a delay. Design your sync to tolerate lag and avoid reapplying the same change in rapid succession.
Can I update custom fields or external contacts?
You can update custom fields on user profiles, but external contacts (shared contacts) require using the Directory API’s 'Customer' endpoints, which have different data models and limitations.
Want this built?
This is a pattern we run in production. We will set up the delegation and build this on top of it — $500 per hour, most of it working the same day.
Talk to us Or read the setup guideRelated use cases
Audit which third-party apps can read your mail
List every OAuth grant across the domain and find the retired tools still holding access.
Automate joiners, movers and leavers
Create accounts, set group membership, provision Drive and hand over mailboxes without a manual checklist.
Continuously verify your delegation still works
A scheduled probe that proves every API still answers under every tenant, before a customer finds out otherwise.