Use cases → Admin and governance
Bulk merge duplicate contacts using delegation
Merge duplicate contacts across many users’ address books by running a delegated automation with a service account.
| Who it is for | IT admins responsible for contact hygiene across multiple Workspace accounts. |
|---|---|
| APIs | Admin SDK |
| Typical scopes | admin.directory.user, admin.directory.user.readonly |
The problem
Duplicate contacts creep in from imports, sync errors, and third-party integrations, causing confusion in autocomplete and mail routing. Manual cleanup does not scale, and native tools only operate per-user.
How it works
- Enumerate all target users via the Admin SDK.
- Impersonate each user with the service account and pull their contacts using the People API.
- Detect duplicates based on email addresses or phone numbers.
- Merge or update the contacts in-place, handling conflicts according to policy.
- Log the changes for review and error handling.
What changes
Contact lists across users are deduplicated in bulk, reducing confusion and misaddressed mail.
Questions people ask
Can I merge contacts for users who have never logged in?
No; users must have an initial contacts profile. Accounts with no prior logins or initialised profiles will return empty results and cannot be updated.
How are merge conflicts handled?
If two contacts have conflicting fields, the People API keeps the most recently updated value unless you specify which fields to preserve. Always review the API’s merge behaviour and log changes.
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.