Experimental. The Graph pull is implemented and tested, but not against every tenant shape. Run a plan before the first apply, and read the directory sync overview for what the module does and refuses to do. Google Workspace sync is not available yet — it requires a service-account integration and follows in a minor release.
Before you start
Directory sync reuses the SSO app registration — the same client ID, tenant ID and secret. So the prerequisite is SSO with Microsoft Entra ID configured and working, including the pinned tenant; the same rule applies here, and an unpinned tenant means the provider will not run.
What sync adds on top is one Graph permission, and that permission needs admin consent — this is the step that requires a Global Administrator or Privileged Role Administrator, where SSO alone did not.
1. Add the Graph application permission
SSO signs users in with delegated scopes. Sync reads the directory with no user present, which is a different grant: an application permission.
In the Entra admin centre, open your app registration → API permissions → Add a permission → Microsoft Graph → Application permissions — not Delegated — and add:
User.Read.All
Then click Grant admin consent for _your tenant_. The status column must show a green check; a permission without consent behaves exactly like a missing one.
Application permissions are tenant-wide by nature. User.Read.All lets this app read every user's profile in the directory — that is what a sync is. It does not grant write access to anything; the plugin's sync is a pull, and nothing is ever written back to Entra.
2. Configure the sync
ITX UserOps → Integrations → Directory sync:
- Enable the module.
- Schedule — twice daily is the default and right for most sites; the sync also runs on demand.
- Conflict policy — the setting to choose deliberately. *Directory wins* overwrites local edits to synced accounts on every run; *WordPress wins* lets local changes stick. The overview has the paragraph worth reading before you pick.
- Automatic offboarding — leave off for now. It is the most consequential switch in the module, and the time to enable it is after you have watched a few plain runs, not before the first one.
3. Run a plan before an apply
The first run should be a dry run: it reads the directory, computes the plan — who would be created, updated, disabled — and records it in the run history without touching anything.
Read the plan like this:
- Creates — directory users with no WordPress account. Their role comes from the same domain mapping SSO uses; if the count surprises you, the mapping is wrong, not the directory.
- Updates — display-name changes, applied per the conflict policy.
- Disables — accounts linked to the directory whose Entra account is disabled or gone. A large number here on a first run usually means stale directory accounts, and is worth understanding before applying.
Only when the plan matches what you expect, run an apply. Every run — dry or applied — lands in the run history with its counts.
?> Local accounts are structurally safe. Sync only ever disables accounts it previously created or synced itself. An account that exists only in WordPress — your original admin, a contractor added by hand — is never touched, whatever the directory says.
4. Then, maybe, automatic offboarding
Once runs are boring, decide about auto_offboard: an account disabled or removed in Entra triggers the full offboarding workflow on the next sync — sessions ended, credentials revoked, the steps you configured. Somebody removed from the directory at 09:00 is offboarded here by the next run, with nobody deciding it on the day. That is the feature. Make sure it is also your policy.
The offboard steps default to the reversible-safe set; read them before widening.
When it does not work
| Symptom | Cause |
|---|---|
| "The directory provider is not configured" | Missing client secret, or the tenant is common/organizations/consumers — sync requires the same pinned tenant as SSO |
Authorization_RequestDenied (403) | The Graph permission is missing, was added as *Delegated* instead of *Application*, or admin consent was never granted |
AADSTS7000215 | The shared client secret expired — fix it once and both SSO and sync recover |
| Plan shows zero directory users | The token was issued before consent was granted — wait a few minutes and re-run, or check the permission's green check |
| Scheduled runs never happen | WP-Cron is not firing — see the DISABLE_WP_CRON note under constants |
Also worth reading
- Directory sync — conflict policy, offboarding, and what is deliberately not synced
- SSO with Microsoft Entra ID — the registration this module reuses
- Groups — directory groups mapping to policy audiences