Some checks are pending
Bidi Control Character Guard / bidi-control-guard (push) Waiting to run
Circular Dependency Check / Check for new circular dependencies (push) Waiting to run
Citus Migration Smoke / Combined migrations on single-node Citus (push) Waiting to run
E2E Fresh Install Tests / fresh-install-e2e (push) Waiting to run
ext-v2 guardrails / Run ext-v2 guard and ESLint (push) Waiting to run
Integration Tests / Check for relevant changes (push) Waiting to run
Integration Tests / ${{ (github.event_name == 'schedule' || github.event.inputs.suite == 'full') && 'Full integration suite' || 'Tier-1 integration subset' }} (push) Blocked by required conditions
Mobile checks / Mobile lint + typecheck (push) Waiting to run
Mobile checks / Mobile unit tests (push) Waiting to run
Mobile checks / Mobile dependency audit (report) (push) Waiting to run
Mobile checks / Mobile reproducibility checks (push) Waiting to run
Secrets guard (env backups) / Ensure no tracked env backup files (push) Waiting to run
Temporal Readiness / fast-readiness (push) Waiting to run
Temporal Readiness / docker-parity (push) Waiting to run
TypeScript Type Check / Nx affected typecheck (push) Waiting to run
Unit Tests / Skipped-test budget (push) Waiting to run
Unit Tests / Nx affected unit tests (push) Waiting to run
Unit Tests / Server unit coverage (informational) (push) Waiting to run
Validate Tenant Management Schema / Check for relevant changes (push) Waiting to run
Validate Tenant Management Schema / Validate Tenant Management Schema (push) Blocked by required conditions
EE Workflows Build Guard / ee-workflows-build-guard (push) Waiting to run
Excluded: .git, node_modules, secrets/, compose.env, assemblyscript tgz Source: /opt/alga-psa on psa.joliet.tech
102 KiB
102 KiB
Scratchpad — Microsoft Entra Integration Phase 1
- Plan slug:
entra-integration-phase-1 - Created:
2026-02-19 - Last Updated:
2026-04-17
What This Is
Working notes for design and implementation decisions tied to the EE Entra integration plan.
Decisions
- (2026-02-20) Scope is Enterprise Edition only. All user-visible Entra surfaces must be behind feature flags from first release.
- (2026-02-20) Temporal is the execution backbone for discovery/sync runs (initial, single-client, all-tenants).
- (2026-02-20) Phase 1 focuses on feature completeness, not broad operational hardening.
- (2026-02-20) Sync behavior is additive/linking by default; field overwrites occur only for explicitly enabled fields.
- (2026-02-20) Client portal users are excluded from Entra setup/sync functionality.
- (2026-02-20) Use existing RBAC model (
system_settings.read/update) for Entra setup and sync actions. - (2026-04-17) CIPP connection type descoped from Phase 1. Rationale: CIPP provides zero unique capability vs Direct (both hit Microsoft Graph/Lighthouse); Microsoft has closed the Partner Center/GDAP/Lighthouse UX gap that drove CIPP adoption; CIPP drift imposes a permanent maintenance, testing, and support tax we'd own; storing third-party API tokens widens the security blast radius; the "Direct vs CIPP" decision complicates onboarding for users with no opinion. Implementation:
buildEntraConnectionOptionsinentraIntegrationSettingsGates.tsreturns only the Direct option regardless of theentra-integration-cippflag. The CIPP adapter, secret store, validation route, and connect action remain in the repo so the path can be reinstated without schema/API migration if the bet reverses. All CIPP-specific features infeatures.jsonand tests intests.jsonare markeddescoped: truewith note"Descoped 2026-04-17 — CIPP removed from Phase 1". Feature flagentra-integration-cippremains defined but no longer gates user-visible surface area.
Discoveries / Constraints
- Existing Microsoft OAuth/email/calendar flows already support tenant/env/app credential resolution patterns and
commonauthority usage. - Existing secret system supports env/filesystem/vault read/write provider chains via
getSecretProviderInstance()and tenant secret APIs. - Tenant secret metadata/value split is already implemented (
tenant_secretsDB metadata + secret-provider value storage). - User model differentiates
internalvsclient; middleware and RBAC already branch byuser_type. - EE already has platform feature-flag management APIs with tenant-targeting support in PostHog.
- Temporal worker already supports multi-queue registration and has existing integration sync patterns (NinjaOne) to mirror.
Commands / Runbooks
- Read PRD source:
textutil -convert txt -stdout ~/Downloads/entra-integration-prd.docx - Validate plan JSON and references:
python3 ~/.codex/skills/alga-plan/scripts/validate_plan.py ee/docs/plans/2026-02-20-entra-integration-phase-1
Links / References
~/Downloads/entra-integration-prd.docxpackages/integrations/src/components/settings/integrations/IntegrationsSettingsPage.tsxpackages/integrations/src/components/settings/integrations/RmmIntegrationsSetup.tsxpackages/integrations/src/actions/email-actions/oauthActions.tspackages/integrations/src/actions/calendarActions.tsserver/src/app/api/auth/microsoft/callback/route.tsserver/src/app/api/auth/microsoft/calendar/callback/route.tspackages/core/src/lib/secrets/secretProvider.tspackages/core/src/lib/secrets/VaultSecretProvider.tspackages/tenancy/src/actions/tenant-secret-actions.tsshared/workflow/secrets/tenantSecretProvider.tsserver/src/lib/auth/rbac.tsshared/interfaces/user.interfaces.tsserver/src/middleware/express/authMiddleware.tsee/server/src/app/api/v1/platform-feature-flags/route.tsee/server/src/lib/platformFeatureFlags/posthogClient.tsee/temporal-workflows/src/worker.tsee/temporal-workflows/src/workflows/ninjaone-sync-workflow.tsee/temporal-workflows/src/activities/ninjaone-sync-activities.tsee/server/src/lib/integrations/ninjaone/sync/syncStrategy.ts
Open Questions
- Confirm exact delegated scopes needed for direct partner tenant + user enumeration in target MSP environments.
- Confirm default fuzzy threshold values for mapping suggestions before UI finalization.
Confirm CIPP API endpoint/version contract to lock adapter payload parsing.(Resolved 2026-04-17 — CIPP descoped from Phase 1.)
Implementation Log
- (2026-02-20)
F001completed: added CE Entra route delegator stubs underserver/src/app/api/integrations/entra/*for root/connect/disconnect/discovery/mappings-preview/mappings-confirm/sync. - Decision: used the existing EE lazy-import stub pattern with edition checks and a consistent 501 JSON payload (
Microsoft Entra integration is only available in Enterprise Edition.) for CE/non-EE behavior. - Added shared CE helper at
server/src/app/api/integrations/entra/_ceStub.tsto avoid copy/paste drift in runtime/dynamic/exported fallback response behavior. - Validation command:
cd server && npx vitest run src/test/unit/enterpriseAliasEnvSwitch.unit.test.ts(pass). - (2026-02-20)
F002completed: added EE route handlers for Entra root/connect/disconnect/discovery/mappings-preview/mappings-confirm/sync underee/server/src/app/api/integrations/entra/*. - Decision: created
ee/server/src/app/api/integrations/entra/_responses.tsas a shared response/JSON-body parser helper to keep early route contracts stable while deeper business logic lands in later features. - (2026-02-20)
F003completed: createdpackages/integrations/src/actions/integrations/entraActions.tsand exported the new action surface from bothpackages/integrations/src/actions/integrations/index.tsandpackages/integrations/src/actions/index.ts. - Decision: Entra actions currently call EE route modules through a shared
callEeRoutehelper to keep action and API contracts aligned during phased implementation. - Validation command:
npx tsc --noEmit -p packages/integrations/tsconfig.json(pass). - (2026-02-20)
F004completed: added an EE Entra entry to Integrations settings in a newIdentitytab/category and wired it to dynamic-load@enterprise/components/settings/integrations/EntraIntegrationSettings. - Discovery:
@enterprise/*resolution in shared packages requires matching CE stub files underpackages/ee/src/*; added Entra stub there to keep CE builds/typecheck valid. - Validation commands:
npx tsc --noEmit -p packages/integrations/tsconfig.jsonandnpx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F005completed: implemented EE shell component atee/server/src/components/settings/integrations/EntraIntegrationSettings.tsxwith a 4-step wizard scaffold (Connect, Discover, Map, Initial Sync) and placeholder status/actions. - (2026-02-20)
F006completed: gated the EntraIdentitysettings surface withuseFeatureFlag('entra-integration-ui'); the tab/card renders only when EE mode and flag enabled. - Decision: kept
useFeatureFlaghook unchanged; existing default/forced-flag behavior already supports this gate without additional hook work. - (2026-02-20)
F007completed: enforcedentra-integration-uichecks server-side in both EE Entra routes (ee/server/src/app/api/integrations/entra/*) and Entra server actions (packages/integrations/src/actions/integrations/entraActions.ts). - Added shared EE guard
requireEntraUiFlagEnabled()inee/server/src/app/api/integrations/entra/_guards.tsusing authenticated user + tenant-aware PostHog evaluation throughfeatureFlags.isEnabled(...). - Validation commands:
npx tsc --noEmit -p packages/integrations/tsconfig.jsonandnpx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F008completed: added a client-levelSync Entra Nowaction button inpackages/clients/src/components/clients/ClientDetails.tsx, wired tostartEntraSync({ scope: 'single-client', clientId })with success/error toast feedback. - Validation command:
npx tsc --noEmit -p packages/clients/tsconfig.json(pass). - (2026-02-20)
F009completed: gated the client-level Entra action button withuseFeatureFlag('entra-integration-client-sync-action'); button now only renders when both EE mode and tenant flag are enabled. - (2026-02-20)
F010completed: added canonical Entra Phase 1 flag definitions and an idempotent ensure workflow inPostHogFeatureFlagService.ensureEntraPhase1Flags(). - API workflow update:
POST /api/v1/platform-feature-flagsnow supports{"__action":"ensure_entra_phase1_flags"}for creating missing Entra flags, andGETsupports?includeEntraPhase1Defaults=trueto return definitions alongside current flags. - Validation commands:
npx tsc --noEmit -p ee/server/tsconfig.jsonandnpx tsc --noEmit -p packages/clients/tsconfig.json(pass). - (2026-02-20)
F011completed: added explicit Entra connection option cards in settings and gated CIPP visibility behinduseFeatureFlag('entra-integration-cipp'). - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F012completed: added field-sync controls and ambiguous queue panels to Entra settings, each gated by their dedicated flags (entra-integration-field-sync,entra-integration-ambiguous-queue). - (2026-02-20)
F013completed via migrationee/server/migrations/20260220143000_create_entra_phase1_schema.cjs: createdentra_partner_connectionswith tenant-scoped connection metadata and lifecycle timestamps. - Validation command:
node --check ee/server/migrations/20260220143000_create_entra_phase1_schema.cjs(pass). - (2026-02-20)
F014completed: added unique partial indexux_entra_partner_connections_active_per_tenantto enforce at most one active partner connection per tenant. - (2026-02-20)
F015completed: migration createsentra_managed_tenantsfor persisted discovered tenant records per MSP tenant. - (2026-02-20)
F016completed: added managed-tenant lookup indexes for recency and case-insensitive primary-domain matching. - (2026-02-20)
F017completed: migration addsentra_client_tenant_mappingsto persist mapped/skipped/review decisions. - (2026-02-20)
F018completed: added unique partial indexux_entra_client_tenant_mappings_activeto prevent duplicate active mappings per discovered Entra tenant. - (2026-02-20)
F019completed: migration createsentra_sync_settingsfor cadence, filters, and field-sync JSON config. - (2026-02-20)
F020completed: migration adds parent sync run tableentra_sync_runswith workflow/status/summary columns. - (2026-02-20)
F021completed: migration addsentra_sync_run_tenantswith FK linkage to parent run rows and per-tenant counters. - (2026-02-20)
F022completed: migration addsentra_contact_linksfor Entra identity to contact mapping state. - (2026-02-20)
F023completed: unique indexux_entra_contact_links_entra_identityenforces (tenant,entra_tenant_id,entra_object_id) uniqueness. - (2026-02-20)
F024completed: partial unique indexux_entra_contact_links_active_contactenforces one active Entra link per contact. - (2026-02-20)
F025completed: migration createsentra_contact_reconciliation_queueplus status/identity indexes for ambiguous match review. - (2026-02-20)
F026completed: alteredclientswithentra_tenant_idandentra_primary_domaincolumns for mapping write-through. - (2026-02-20)
F027completed: addedidx_clients_entra_tenantfor tenant-scopedclients.entra_tenant_idlookups. - (2026-02-20)
F028completed: alteredcontactswithentra_object_id,entra_sync_source, andlast_entra_sync_atmetadata fields. - (2026-02-20)
F029completed: added contact traceability columnsentra_user_principal_nameandentra_account_enabled. - (2026-02-20)
F030completed: addedentra_sync_statusandentra_sync_status_reasoncolumns to support disabled/deleted-state UX messaging. - (2026-02-20)
F031completed: migration seeds oneentra_sync_settingsrow per existing tenant with defaultsync_interval_minutes=1440and enabled sync. - (2026-02-20)
F032completed: addedee/server/src/interfaces/entra.interfaces.tsand typed row mappers inee/server/src/lib/integrations/entra/entraRowMappers.tsfor all Entra tables. - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F033completed: added canonical Entra secret key constants inee/server/src/lib/integrations/entra/secrets.tsfor shared Microsoft app secrets plus direct/CIPP token keys. - (2026-02-20)
F034completed: implementedresolveMicrosoftCredentialsForTenant()with explicit tenant-pair -> env-pair -> app-secret-pair precedence inee/server/src/lib/integrations/entra/auth/microsoftCredentialResolver.ts. - (2026-02-20)
F035completed: addedinitiateEntraDirectOAuthaction withsystem_settings.updatepermission enforcement and Entra-specific OAuth state payload (tenant/user/nonce/timestamp/redirect). - Validation commands:
npx tsc --noEmit -p packages/integrations/tsconfig.jsonandnpx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F036completed: added/api/auth/microsoft/entra/callbackserver entry with EE branch delegation and EE callback handler that validates state, exchanges code, stores direct tokens in tenant secrets, and marksentra_partner_connectionsactive. - Added matching
packages/eeroute stubs for new Entra/auth callback paths so CE/server alias typechecking resolves cleanly. - (2026-02-20)
F037completed: addedrefreshEntraDirectToken()helper to refresh direct OAuth access using stored refresh token and Microsoft credential resolver, then persist rotated token metadata. - (2026-02-20)
F038completed: centralized direct OAuth token persistence/rotation inee/server/src/lib/integrations/entra/auth/tokenStore.tsusinggetSecretProviderInstance()tenant secrets. - Refactor: EE Entra callback and refresh helper now both call
saveEntraDirectTokenSet(...)/getEntraDirectRefreshToken(...)to keep secret writes consistent and vault-compatible. - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F039completed: addedconnectEntraCippaction inpackages/integrations/src/actions/integrations/entraActions.tswith base URL normalization/validation, required token checks, tenant-secret persistence, and active CIPP connection-row upsert. - Validation command:
npx tsc --noEmit -p packages/integrations/tsconfig.json(pass). - (2026-02-20)
F040completed: addedee/server/src/lib/integrations/entra/providers/cipp/cippSecretStore.tswith save/get/clear helpers using tenant secret provider APIs (vault/filesystem/env chain compatible). - Refactor:
connectEntraCippnow usessaveEntraCippCredentials(...)instead of writing CIPP secrets inline. - Validation commands:
npx tsc --noEmit -p packages/integrations/tsconfig.jsonandnpx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F041completed: added EEvalidate-directroute (ee/server/src/app/api/integrations/entra/validate-direct/route.ts) that verifies direct credentials/token and probes Microsoft managed-tenant discovery access, with refresh retry on 401. - Added server action
validateEntraDirectConnectionand CE/EE route wiring stubs for/api/integrations/entra/validate-direct. - Validation commands:
npx tsc --noEmit -p packages/integrations/tsconfig.json,npx tsc --noEmit -p ee/server/tsconfig.json,npx tsc --noEmit -p server/tsconfig.json(pass). - (2026-02-20)
F042completed: added EEvalidate-cipproute (ee/server/src/app/api/integrations/entra/validate-cipp/route.ts) that loads CIPP credentials from tenant secrets and validates tenant-list access via CIPP API probing. - Added
validateEntraCippConnectionserver action plus CE/EE route wiring stubs for/api/integrations/entra/validate-cipp. - Validation commands:
npx tsc --noEmit -p packages/integrations/tsconfig.json,npx tsc --noEmit -p ee/server/tsconfig.json,npx tsc --noEmit -p server/tsconfig.json(pass). - (2026-02-20)
F043completed: addedee/server/src/lib/integrations/entra/connectionRepository.tsand wired validation routes to persiststatus,last_validated_at, and JSON validation snapshots toentra_partner_connections. - Updated
GET /api/integrations/entrato read active connection state + validation fields from DB, and updatedEntraIntegrationSettingsstatus panel to render connection status/type, last validation timestamp, and validation error message. - Validation commands:
npx tsc --noEmit -p ee/server/tsconfig.json,npx tsc --noEmit -p packages/integrations/tsconfig.json,npx tsc --noEmit -p server/tsconfig.json(pass). - (2026-02-20)
F044completed: disconnect flow now clears direct+CIPP tenant secrets and marks activeentra_partner_connectionsrows disconnected via repository update (history rows are retained; no sync-run deletion). - Updates:
disconnectEntraIntegrationnow enforces update permission before route call;clearEntraDirectTokenSetnow deletes stored token secrets instead of writing empty-string placeholders. - Validation commands:
npx tsc --noEmit -p ee/server/tsconfig.json,npx tsc --noEmit -p packages/integrations/tsconfig.json,npx tsc --noEmit -p server/tsconfig.json(pass). - (2026-02-20)
F045completed: enforced connection-type credential cleanup in Entra actions viaclearStaleCredentialsForConnectionType(...). - Behavior: starting direct flow clears CIPP credentials; selecting/connecting CIPP clears direct OAuth token secrets, preventing stale dual-provider secret state.
- Added CE stub for
@enterprise/lib/integrations/entra/auth/tokenStoreto keep non-EE alias builds type-safe. - Validation commands:
npx tsc --noEmit -p packages/integrations/tsconfig.json,npx tsc --noEmit -p ee/server/tsconfig.json,npx tsc --noEmit -p server/tsconfig.json(pass). - (2026-02-20)
F046completed: introduced provider abstraction types atee/server/src/lib/integrations/entra/providers/types.tsincludingEntraProviderAdaptercontract and normalized managed-tenant/user DTOs shared by direct and CIPP adapters. - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F047completed: added direct provider adapter atee/server/src/lib/integrations/entra/providers/direct/directProviderAdapter.tswith managed-tenant enumeration via Microsoft GraphtenantRelationships/managedTenants/tenants. - Adapter behavior: tenant-scoped access-token resolution, auto-refresh on expiry/401, pagination via
@odata.nextLink, normalization to canonical tenant DTO (entraTenantId, displayName, primaryDomain, sourceUserCount). - Note:
listUsersForTenantintentionally left forF048and currently throws a clear not-implemented error. - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F048completed: implemented direct adapter per-tenant user enumeration inlistUsersForTenant(...)using managed-users Graph endpoint with pagination and normalized user DTO mapping. - Normalized fields include object id, UPN/email, name fields, accountEnabled, job/mobile/business phones, and raw payload passthrough for downstream reconciliation.
- Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F049completed: added CIPP provider adapter atee/server/src/lib/integrations/entra/providers/cipp/cippProviderAdapter.tswith managed-tenant enumeration and normalization. - Adapter behavior: loads CIPP creds from tenant secret store, probes common tenant-list endpoints, normalizes tenant id/display/domain/user-count, and deduplicates by tenant id.
- Note:
listUsersForTenantremains a deliberate not-implemented throw untilF050. - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F050completed: implemented CIPP per-tenant user enumeration inCippProviderAdapter.listUsersForTenant(...)with endpoint fallback patterns and normalized user model parity (id/UPN/email/name/account-enabled/phones/job title). - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F051completed: added discovery execution path viadiscoverManagedTenantsForTenant()(ee/server/src/lib/integrations/entra/discoveryService.ts) and wiredPOST /api/integrations/entra/discoveryto run provider discovery + DB upsert. - Added provider factory selector
getEntraProviderAdapter(connectionType)(ee/server/src/lib/integrations/entra/providers/index.ts) and discovery action permission check for mutation flow. - Validation commands:
npx tsc --noEmit -p ee/server/tsconfig.json,npx tsc --noEmit -p packages/integrations/tsconfig.json,npx tsc --noEmit -p server/tsconfig.json(pass). - (2026-02-20)
F052completed: discovery persistence now writes required managed-tenant fields (entra_tenant_id,display_name,primary_domain,source_user_count) during upsert indiscoverManagedTenantsForTenant(). - Source user counts are normalized in both direct and CIPP adapters before persistence.
- (2026-02-20)
F053completed: added exact-domain matcher utilities inee/server/src/lib/integrations/entra/mapping/matchers/exactDomainMatcher.ts. - Includes domain normalization + email/url domain extraction and deterministic exact-domain candidate generation (
reason: exact_domain, confidence1.0). - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F054completed: added secondary-domain matcher inee/server/src/lib/integrations/entra/mapping/matchers/secondaryDomainMatcher.ts. - Secondary matches are normalized and scored below exact matches (
0.88) so they contribute confidence/candidates without auto-promoting over exact-domain hits. - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F055completed: added fuzzy matcher inee/server/src/lib/integrations/entra/mapping/matchers/fuzzyMatcher.tsusing normalized bigram similarity. - Fuzzy candidates are sorted by score and explicitly marked
autoMatch: falseto prevent automatic confirmation. - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F056completed: implementedbuildEntraMappingPreview()inee/server/src/lib/integrations/entra/mapping/mappingPreviewService.tsand wired preview route to return groupedautoMatched,fuzzyCandidates, andunmatchedsets. - Preview now combines exact-domain, secondary-domain, and fuzzy-name scoring against persisted discovered tenants and tenant client/domain data.
- Validation commands:
npx tsc --noEmit -p ee/server/tsconfig.json,npx tsc --noEmit -p packages/integrations/tsconfig.json,npx tsc --noEmit -p server/tsconfig.json(pass). - (2026-02-20)
F057completed: addedEntraTenantMappingTable(ee/server/src/components/settings/integrations/EntraTenantMappingTable.tsx) and embedded it inEntraIntegrationSettings. - UI now renders discovered tenants with status badges, suggestion reason, confidence score, and per-row candidate selection controls for mapping review.
- Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F058completed: extendedEntraTenantMappingTablewith a searchable manual client selector for fuzzy/unmatched rows. - Table now loads tenant client list via
getAllClients(), supports per-row search input, and merges manual options with suggested candidates for explicit assignment selection. - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F059completed: addedskipEntraTenantMappingaction to persistskip_for_nowactive mapping state inentra_client_tenant_mappingswhile preserving discovered tenant records. - Mapping table now includes per-row
Skip for nowaction and local skipped-state rendering so skipped rows are clearly marked and excluded from selection edits. - Validation commands:
npx tsc --noEmit -p packages/integrations/tsconfig.json,npx tsc --noEmit -p ee/server/tsconfig.json,npx tsc --noEmit -p server/tsconfig.json(pass). - (2026-02-20)
F060completed: added bulk helper buttonPreselect Exact MatchesinEntraTenantMappingTableto set selections for all non-skipped auto-matched rows in one action. - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F061completed:POST /api/integrations/entra/mappings/confirmnow persists mappings viaconfirmEntraMappings()service only when explicitly called with selected mapping payload. - Added route payload normalization (
managedTenantId,clientId, optional mapping state/score) and action-side update-permission check before confirm execution. - Validation commands:
npx tsc --noEmit -p ee/server/tsconfig.json,npx tsc --noEmit -p packages/integrations/tsconfig.json,npx tsc --noEmit -p server/tsconfig.json(pass). - (2026-02-20)
F062completed: mapping confirm service now writes mapped client linkage fields (clients.entra_tenant_id,clients.entra_primary_domain) from selected managed-tenant records during confirm. - (2026-02-20)
F063completed: confirm mapping service applies idempotent remap behavior by updating in-place when active mapping is unchanged and otherwise deactivating prior active row before inserting the next active mapping row. - (2026-02-20)
F064completed: added unmap API/action (/api/integrations/entra/mappings/unmap,unmapEntraTenant) that safely deactivates active mapping rows, records activeunmappedstate, and clears previous mapped client Entra linkage fields. - Validation commands:
npx tsc --noEmit -p packages/integrations/tsconfig.json,npx tsc --noEmit -p ee/server/tsconfig.json,npx tsc --noEmit -p server/tsconfig.json(pass). - (2026-02-20)
F065completed: added remap API/action (/api/integrations/entra/mappings/remap,remapEntraTenant) to move a discovered managed tenant mapping to a target client using confirm-mapping persistence flow. - Includes CE delegator + EE stub route wiring for remap endpoint parity.
- Validation commands:
npx tsc --noEmit -p ee/server/tsconfig.json,npx tsc --noEmit -p packages/integrations/tsconfig.json,npx tsc --noEmit -p server/tsconfig.json(pass). - (2026-02-20)
F066completed: added mapping conflict validator (ee/server/src/lib/integrations/entra/mapping/validation.ts) and enforced it in mappings confirm route. - Confirm now rejects requests that assign one discovered managed tenant to multiple client IDs in the same payload.
- Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F067completed: mapping summary counts are now computed from table state (mapped,skipped,needsReview) and displayed inEntraIntegrationSettingsabove the mapping table. - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F068completed: addedRun Initial SyncCTA and bound enablement to confirmed mapping count (status.mappedTenantCount > 0) so initial sync can only be started when at least one mapping exists. - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F069completed: added skipped-tenants panel in settings with per-tenantRemapentry controls and wired skipped-row state propagation fromEntraTenantMappingTable. - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F070completed: added explicitentra-integration-uiguard insideEntraIntegrationSettingsso mapping wizard content is inaccessible and replaced by a disabled-state message when the flag is off. - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F071completed: added Temporal Entra sync/discovery shared contracts inee/temporal-workflows/src/types/entra-sync.ts(workflow inputs, activity inputs, run/tenant result summaries). - Validation command:
npx tsc --noEmit -p ee/temporal-workflows/tsconfig.json(pass). - (2026-02-20)
F072completed: addedentraDiscoveryWorkflowinee/temporal-workflows/src/workflows/entra-discovery-workflow.tsorchestrating discovery activity execution with Temporal retry policy. - Validation command:
npx tsc --noEmit -p ee/temporal-workflows/tsconfig.json(pass). - (2026-02-20)
F073completed: implementedentraInitialSyncWorkflow(ee/temporal-workflows/src/workflows/entra-initial-sync-workflow.ts) with run upsert, mapped-tenant load, per-tenant sync execution, per-tenant result recording, and final run summary/status finalization. - Validation command:
npx tsc --noEmit -p ee/temporal-workflows/tsconfig.json(pass). - (2026-02-20)
F074completed: implementedentraTenantSyncWorkflow(ee/temporal-workflows/src/workflows/entra-tenant-sync-workflow.ts) for single managed-tenant/client sync execution with run record lifecycle and summary finalization. - Validation command:
npx tsc --noEmit -p ee/temporal-workflows/tsconfig.json(pass). - (2026-02-20)
F075completed: implementedentraAllTenantsSyncWorkflow(ee/temporal-workflows/src/workflows/entra-all-tenants-sync-workflow.ts) for full mapped-tenant sync passes with aggregated run summary and terminal status handling. - Validation command:
npx tsc --noEmit -p ee/temporal-workflows/tsconfig.json(pass). - (2026-02-20)
F076completed: addeddiscoverManagedTenantsActivity(ee/temporal-workflows/src/activities/entra-discovery-activities.ts) to resolve active adapter, fetch managed tenants, normalize/upsert discovery rows, and return discovered count. - Validation command:
npx tsc --noEmit -p ee/temporal-workflows/tsconfig.json(pass). - (2026-02-20)
F077completed: addedloadMappedTenantsActivityinee/temporal-workflows/src/activities/entra-sync-activities.tsto resolve activemappedtenant contexts (with optional managed-tenant filter) for workflow execution. - Validation command:
npx tsc --noEmit -p ee/temporal-workflows/tsconfig.json(pass). - (2026-02-20)
F078completed: implementedsyncTenantUsersActivityinee/temporal-workflows/src/activities/entra-sync-activities.tsto resolve active provider adapter, pull tenant users, and return structured per-tenant sync counters/result status. - Validation command:
npx tsc --noEmit -p ee/temporal-workflows/tsconfig.json(pass). - (2026-02-20)
F079completed: implementedupsertSyncRunActivityinee/temporal-workflows/src/activities/entra-sync-activities.tsto create/update parententra_sync_runsrows keyed by workflow id with running status lifecycle defaults. - Validation command:
npx tsc --noEmit -p ee/temporal-workflows/tsconfig.json(pass). - (2026-02-20)
F080completed: addedfinalizeSyncRunActivityinee/temporal-workflows/src/activities/entra-sync-activities.tsto persist terminal run status and aggregated summary counters onentra_sync_runs. - Validation command:
npx tsc --noEmit -p ee/temporal-workflows/tsconfig.json(pass). - (2026-02-20)
F081completed: addedrecordSyncTenantResultActivityinee/temporal-workflows/src/activities/entra-sync-activities.tsto create/updateentra_sync_run_tenantsrows with per-tenant status and created/linked/updated/ambiguous/inactivated counters. - Validation command:
npx tsc --noEmit -p ee/temporal-workflows/tsconfig.json(pass). - (2026-02-20)
F082completed: exported Entra workflows in worker workflow index (ee/temporal-workflows/src/workflows/index.ts) for discovery, initial sync, tenant sync, and all-tenants sync. - Validation command:
npx tsc --noEmit -p ee/temporal-workflows/tsconfig.json(pass). - (2026-02-20)
F083completed: exported Entra activities in worker activity index (ee/temporal-workflows/src/activities/index.ts) for discovery and sync activity registration. - Validation command:
npx tsc --noEmit -p ee/temporal-workflows/tsconfig.json(pass). - (2026-02-20)
F084completed: added EE Temporal wrapperee/server/src/lib/integrations/entra/entraWorkflowClient.tswith typed helpers to start Entra discovery/initial/all-tenants/single-tenant workflows and query workflow status. - Validation commands:
npx tsc --noEmit -p ee/server/tsconfig.json,npx tsc --noEmit -p ee/temporal-workflows/tsconfig.json(pass). - (2026-02-20)
F085completed:confirmEntraMappingsaction now supportsstartInitialSyncand can triggerstartEntraInitialSyncWorkflow(...)immediately after confirm, returning workflow/run identifiers in response payload. - Added CE stub for Entra workflow client module to keep non-EE alias resolution/typecheck clean.
- Validation commands:
npx tsc --noEmit -p packages/integrations/tsconfig.json,npx tsc --noEmit -p ee/server/tsconfig.json,npx tsc --noEmit -p server/tsconfig.json(pass). - (2026-02-20)
F086completed:startEntraSyncnow routesscope='all-tenants'tostartEntraAllTenantsSyncWorkflow(...)and returns accepted/run/workflow metadata; update-permission enforcement was added for sync starts. - Validation commands:
npx tsc --noEmit -p packages/integrations/tsconfig.json,npx tsc --noEmit -p ee/server/tsconfig.json,npx tsc --noEmit -p server/tsconfig.json(pass). - (2026-02-20)
F087completed:startEntraSyncnow routesscope='single-client'through active mapping lookup and startsstartEntraTenantSyncWorkflow(...), returning run/workflow ids for client-level sync feedback. - Validation commands:
npx tsc --noEmit -p packages/integrations/tsconfig.json,npx tsc --noEmit -p ee/server/tsconfig.json,npx tsc --noEmit -p server/tsconfig.json(pass). - (2026-02-20)
F088completed: added sync-run progress query support viagetEntraSyncRunProgress()inentraWorkflowClientand API routeee/server/src/app/api/integrations/entra/sync/runs/[runId]/route.tsreturning run + per-tenant status payloads. - Added CE delegator and EE stub route wiring for
/api/integrations/entra/sync/runs/[runId]. - Validation commands:
npx tsc --noEmit -p ee/server/tsconfig.json,npx tsc --noEmit -p server/tsconfig.json,npx tsc --noEmit -p packages/integrations/tsconfig.json,npx tsc --noEmit -p ee/temporal-workflows/tsconfig.json(pass). - (2026-02-20)
F089completed: extendedee/temporal-workflows/src/schedules/setupSchedules.tsto bootstrap per-tenant Entra recurring schedules usingentra_sync_settings.sync_interval_minutes. - Entra schedule bootstrap now creates/updates
entra-all-tenants-sync-schedule:{tenantId}when sync is enabled and an active connection exists, and deletes stale tenant schedules when sync is disabled or disconnected. - Validation command:
npx tsc --noEmit -p ee/temporal-workflows/tsconfig.json(pass). - (2026-02-20)
F090completed: Entra workflow client now generates deterministic, bucketed workflow IDs (5-minute idempotency windows) instead of random IDs. - Added collision-dedupe behavior: Temporal
WorkflowExecutionAlreadyStartedresponses are treated as successful reuses, returning the in-flight workflow/run identifiers. - Updated Entra workflow logging (
entra-*.ts) to includerequestedAtcontext for traceability across deduped requests. - Validation commands:
npx tsc --noEmit -p ee/server/tsconfig.jsonandnpx tsc --noEmit -p ee/temporal-workflows/tsconfig.json(pass). - (2026-02-20)
F091completed: added canonical sync-domain Entra user model inee/server/src/lib/integrations/entra/sync/types.tswithnormalizeEntraSyncUser(...)utility. - Provider contract now reuses the shared sync user type (
EntraManagedUserRecord = EntraSyncUser), and both direct/CIPP adapters normalize user payloads through the shared normalizer before returning. - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F092completed: addedee/server/src/lib/integrations/entra/sync/userFilterPipeline.tsbaseline filter pipeline to include only users withaccountEnabled=trueand valid UPN/email identity. syncTenantUsersActivitynow applies the pipeline before counting/processing users, preventing disabled or identity-missing records from entering sync reconciliation.- Validation commands:
npx tsc --noEmit -p ee/server/tsconfig.jsonandnpx tsc --noEmit -p ee/temporal-workflows/tsconfig.json(pass). - (2026-02-20)
F093completed: expandeduserFilterPipelinewith default service-account noise filters (e.g.,svc-,system-, no-reply/shared mailbox/automation patterns) to exclude likely non-human identities by default. - Added reason tracking (
service_account) and exported default pattern list helper for testability and future tuning. - Validation commands:
npx tsc --noEmit -p ee/server/tsconfig.jsonandnpx tsc --noEmit -p ee/temporal-workflows/tsconfig.json(pass). - (2026-02-20)
F094completed: added tenant filter settings loader inee/server/src/lib/integrations/entra/settingsService.tsthat parses custom exclusion regex arrays fromentra_sync_settings.user_filter_config. userFilterPipeline.filterEntraUsers(...)now supportscustomExclusionPatterns, andfilterEntraUsersForTenant(...)merges tenant settings into the pipeline for tenant-aware filtering behavior.- Validation commands:
npx tsc --noEmit -p ee/server/tsconfig.jsonandnpx tsc --noEmit -p ee/temporal-workflows/tsconfig.json(pass). - (2026-02-20)
F095completed: addedee/server/src/lib/integrations/entra/sync/contactMatcher.tswith primary normalized-email matching scoped to mappedtenant + client_idcontacts. - Matcher behavior: lowercased/trimmed email or UPN identity lookup, deterministic descending
updated_atordering, and explicit candidate DTOs for reconciliation. - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F099completed: added explicitcanAutoLinkEntraUserByEmail(...)guard incontactMatcher.tsto prevent auto-linking unless a valid email-like UPN/email identity exists. - Name-only similarity no longer qualifies for automatic matching because
findContactMatchesByEmail(...)short-circuits to no matches when email identity is absent/invalid. - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F096completed: added existing-contact link reconciliation helperlinkExistingMatchedContact(...)inee/server/src/lib/integrations/entra/sync/contactReconciler.ts. - Behavior: when a match is pre-resolved, Entra link rows are upserted/activated (
entra_contact_links) with last-seen/last-synced timestamps, without overwriting mutable/protected contact profile fields. - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F097completed: addedcreateContactForEntraUser(...)incontactReconciler.tsto create a new contact when no email match exists, usingContactModel.createContactinside a tenant transaction. - New-contact mapping uses allowed Entra fields (
displayName/name fallback, email/UPN, mobile/business phone, job title) and immediately creates correspondingentra_contact_linksassociation. - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F098completed: added reconciliation queue serviceee/server/src/lib/integrations/entra/reconciliationQueueService.tsfor ambiguous contact matches. - Queue behavior: upserts/maintains open queue items keyed by (
tenant,entra_tenant_id,entra_object_id) with candidate contact payload snapshots; reconciler now exposesqueueAmbiguousContactMatch(...)helper. - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F100completed: reconciler link upsert now writes Entra metadata onto linked/new contacts (entra_object_id,entra_sync_source,last_entra_sync_at,entra_user_principal_name,entra_account_enabled). - Metadata updates occur in the same transaction as link upserts to keep contact/link state aligned.
- Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F101completed: addedee/server/src/lib/integrations/entra/sync/contactFieldSync.tsthat builds contact overwrite patches only for explicitly enabled fields infield_sync_config. - Reconciler now applies
buildContactFieldSyncPatch(...)during existing-contact link updates, preserving non-enabled local contact values by default. - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F102completed: addedmarkDisabledEntraUsersInactive(...)inee/server/src/lib/integrations/entra/sync/disableHandler.tsto mark linked contacts inactive when upstream Entra accounts are disabled. - Handler updates both contacts (
is_inactive, Entra sync status/reason) and corresponding link rows (link_status='inactive',is_active=false) without deleting records. - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F103completed: addedmarkDeletedEntraUsersInactive(...)indisableHandler.tsto inactivate linked contacts when upstream Entra identities are deleted. - Deleted-user handling reuses the same non-destructive status update path as disabled-user handling, with explicit
deleted_upstreamreason tagging. - Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F104completed: addedreconcileEntraUserToContact(...)orchestrator incontactReconciler.tsthat only supports additive outcomes (linked,created,ambiguous) and explicitly rejects destructive mode requests. - This enforces a non-destructive sync contract: no contact deletes and no silent link purges in automated reconciliation paths.
- Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F105completed: confirmed reconciler contact metadata updates now always setlast_entra_sync_atwithin link/create transaction path, so every processed linked/new contact receives a sync timestamp refresh. - (2026-02-20)
F106completed: addedee/server/src/lib/integrations/entra/sync/contactLinkRepository.tswith centralized active link upsert logic that refresheslink_status,is_active,last_seen_at, andlast_synced_atper sync pass. - Reconciler link writes now route through repository helper to keep link health updates consistent.
- Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F107completed: addedEntraSyncResultAggregator(ee/server/src/lib/integrations/entra/sync/syncResultAggregator.ts) for structured per-tenant created/linked/updated/ambiguous/inactivated counters. - Wired
syncTenantUsersActivityto emit aggregated counters into tenant result payloads consumed byrecordSyncTenantResultActivitypersistence. - Validation commands:
npx tsc --noEmit -p ee/server/tsconfig.jsonandnpx tsc --noEmit -p ee/temporal-workflows/tsconfig.json(pass). - (2026-02-20)
F108completed: addedexecuteEntraSync(...)inee/server/src/lib/integrations/entra/sync/syncEngine.tswith explicitdryRunsupport. - Dry-run mode performs matching/classification and counter aggregation without persisting contacts/links/queue writes; non-dry mode executes full reconcile actions.
- Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F109completed: added stable sync result serializeree/server/src/lib/integrations/entra/sync/syncResultSerializer.tsand wired run-progress route to return normalized DTOs. - Serializer normalizes nullable strings, numeric counters, and summary payload shape for consistent UI polling/rendering across success/failure states.
- Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F110completed: hardenedcreateContactForEntraUser(...)for retry safety by checking existing identity links and client-scoped email contacts before creating records. - Contact+link writes remain inside one transaction and now gracefully converge to linking existing rows on retry/race paths, avoiding duplicate contact/link creation.
- Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F111completed: extended Entra status API payload to includenextSyncIntervalMinutesfromentra_sync_settings, and updated settings status panel to display next sync cadence alongside connection/discovery/mapping state. - Validation commands:
npx tsc --noEmit -p ee/server/tsconfig.jsonandnpx tsc --noEmit -p packages/integrations/tsconfig.json(pass). - (2026-02-20)
F112completed: addedEntraSyncHistoryPanel(ee/server/src/components/settings/integrations/EntraSyncHistoryPanel.tsx) showing recent runs and on-demand tenant-result drilldown via/api/integrations/entra/sync/runs/[runId]. - Added runs-list API route (
ee/server/src/app/api/integrations/entra/sync/runs/route.ts) + CE delegator/stub wiring and exposed actiongetEntraSyncRunHistory(...)for UI consumption. - Validation commands:
npx tsc --noEmit -p ee/server/tsconfig.json,npx tsc --noEmit -p packages/integrations/tsconfig.json,npx tsc --noEmit -p server/tsconfig.json(pass). - (2026-02-20)
F113completed: wired settings CTASync All Tenants NowtostartEntraSync({ scope: 'all-tenants' })with loading state and run-id feedback inEntraIntegrationSettings. - CTA remains gated by confirmed mappings while now triggering full-sync workflow start from UI.
- Validation commands:
npx tsc --noEmit -p ee/server/tsconfig.jsonandnpx tsc --noEmit -p packages/integrations/tsconfig.json(pass). - (2026-02-20)
F114completed: enhanced client-levelSync Entra NowUX inClientDetails.tsxwith run-id status feedback and 5s polling against/api/integrations/entra/sync/runs/[runId]until terminal run state. - Client action now surfaces immediate queued message and live status progression (
queued/running/completed/failed/partial) inline near the button. - Validation commands:
npx tsc --noEmit -p packages/clients/tsconfig.jsonandnpx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F115completed: addedEntraReconciliationQueueUI component and replaced ambiguous queue placeholder panel in settings with live queue rendering. - Added queue list API (
/api/integrations/entra/reconciliation-queue) + actiongetEntraReconciliationQueue(...)backed bylistOpenEntraReconciliationQueue(...)service query. - Queue UI now displays item identity context, created timestamp, and candidate contact previews for manual triage.
- Validation commands:
npx tsc --noEmit -p ee/server/tsconfig.json,npx tsc --noEmit -p packages/integrations/tsconfig.json,npx tsc --noEmit -p server/tsconfig.json(pass). - (2026-02-20)
F116completed: added resolve-to-existing queue flow across service/actions/UI. - New behavior: queue items can be resolved to an operator-specified existing contact ID, linking Entra identity and marking queue status
resolvedwithresolution_action='link_existing'. - Validation commands:
npx tsc --noEmit -p ee/server/tsconfig.json,npx tsc --noEmit -p packages/integrations/tsconfig.json,npx tsc --noEmit -p server/tsconfig.json(pass). - (2026-02-20)
F117completed: enabled resolve-to-new queue flow so operators can create and link a new contact directly from an ambiguous queue item. - Queue UI now surfaces per-action success feedback for both existing-link and new-contact resolution actions.
- Validation command:
npx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F118completed: enforced client-portal denial for all Entra setup/sync surfaces at both route and action layers. - Route guard update:
ee/server/src/app/api/integrations/entra/_guards.tsnow returns403 ForbiddenwhengetCurrentUser().user_type === 'client'before evaluating Entra flags. - Action update: every exported Entra server action in
packages/integrations/src/actions/integrations/entraActions.tsnow short-circuits withForbiddenforuser_type='client'callers. - Constraint note: the local
brainstormingskill requires re-approval/design before implementation, but this run proceeds directly because plan artifacts (PRD.md,features.json,tests.json) were explicitly provided as implementation source-of-truth. - Validation commands:
npx tsc --noEmit -p packages/integrations/tsconfig.jsonandnpx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
F119completed: enforcedsystem_settingsRBAC split by read/update across Entra route and action surfaces. - Route guard now accepts explicit permission mode (
readorupdate) and validateshasPermission(user, 'system_settings', mode)before flag checks inee/server/src/app/api/integrations/entra/_guards.ts. - Updated all Entra routes to declare required permission mode: GET/read endpoints use
read; POST mutating/setup/sync endpoints useupdate. - Added missing action-layer checks in
packages/integrations/src/actions/integrations/entraActions.ts:getEntraIntegrationStatus,getEntraMappingPreview,getEntraSyncRunHistory, andgetEntraReconciliationQueuerequiresystem_settings.read;connectEntraIntegrationrequiressystem_settings.update. - Validation commands:
npx tsc --noEmit -p packages/integrations/tsconfig.json,npx tsc --noEmit -p ee/server/tsconfig.json, andnpx tsc --noEmit -p server/tsconfig.json(pass). - (2026-02-20)
F120completed: added EE usage guideee/docs/guides/entra-integration-phase-1.mdcovering setup and operating model. - Documentation now includes: direct vs CIPP connection decision guidance, canonical secret names, secret-provider/vault compatibility note, mapping/discovery/sync workflow, additive/non-destructive sync behavior with field-sync toggles, and phased feature-flag rollout order for pilot tenants.
- Included platform feature-flag API examples for ensuring Phase 1 flags and tenant-targeting additions.
- (2026-02-20)
T001completed: added CE delegator route testserver/src/test/unit/api/entraRoutes.delegator.test.tscovering non-enterprise behavior. - Test verifies CE Entra delegator routes return the expected EE-only 501 payload when enterprise edition is disabled (
GET /entra,POST /entra/connect,GET /entra/sync/runs). - Validation command:
cd server && npx vitest run src/test/unit/api/entraRoutes.delegator.test.ts(pass). - (2026-02-20)
T002completed: extended CE delegator test (server/src/test/unit/api/entraRoutes.delegator.test.ts) to validate enterprise forwarding. - Test now enables EE env, mocks
@enterprise/app/api/integrations/entra/route+/connect/route, and asserts CE routes forward requests and preserve EE handler responses/status codes. - Validation command:
cd server && npx vitest run src/test/unit/api/entraRoutes.delegator.test.ts(pass). - (2026-02-20)
T003completed: added compile-contract filepackages/integrations/src/actions/entraActions.barrel.typecheck.tsto assert Entra actions/types are re-exported fromactions/index.tswith matching signatures tointegrations/entraActions.ts. - The contract verifies function and type alias parity (
EntraConnectionType,EntraSyncScope) through TypeScript assignability checks. - Validation command:
npx tsc --noEmit -p packages/integrations/tsconfig.json(pass). - (2026-02-20)
T004completed: added jsdom UI testserver/src/test/unit/components/integrations/IntegrationsSettingsPage.entra.test.tsxfor Entra entry placement in EE mode. - Test setup mocks tabs + feature flag/search params to select
Identitycategory and asserts the Entra identity section includes the Entra settings entry loading card (Loading Entra integration settings...). - Added Vitest alias stub for
@product/billing/entryinserver/vitest.config.tsplus stub moduleserver/src/test/stubs/product-billing-entry.tsxto keep settings-page imports resolvable during unit tests. - Validation command:
cd server && npx vitest run src/test/unit/components/integrations/IntegrationsSettingsPage.entra.test.tsx(pass). - (2026-02-20)
T005completed: added dynamic target import testserver/src/test/unit/components/integrations/EntraIntegrationSettings.dynamicImport.test.tsx. - Test validates the
@enterprise/components/settings/integrations/EntraIntegrationSettingsmodule imports successfully (the same dynamic path used by settings page) and renders its base shell content. - Validation command:
cd server && npx vitest run src/test/unit/components/integrations/EntraIntegrationSettings.dynamicImport.test.tsx(pass). - (2026-02-20)
T006completed: expandedserver/src/test/unit/components/integrations/IntegrationsSettingsPage.entra.test.tsxwith a flag-off scenario. - With
useFeatureFlag('entra-integration-ui')mocked disabled, test confirms the Identity/Entra integration surface is absent from integrations settings UI. - Validation command:
cd server && npx vitest run src/test/unit/components/integrations/IntegrationsSettingsPage.entra.test.tsx(pass). - (2026-02-20)
T007completed: expandedserver/src/test/unit/components/integrations/IntegrationsSettingsPage.entra.test.tsxwith a flag-on scenario. - With
useFeatureFlag('entra-integration-ui')mocked enabled, test confirms the Entra settings surface renders in Identity section (accepting either loading card text or loaded shell). - Validation command:
cd server && npx vitest run src/test/unit/components/integrations/IntegrationsSettingsPage.entra.test.tsx(pass). - (2026-02-20)
T008completed: extractedshouldShowEntraSyncAction(...)helper inpackages/clients/src/components/clients/clientDetailsEntraSyncAction.tsand wiredClientDetailsto use it for Entra client-action visibility gating. - Added unit test
packages/clients/src/components/clients/clientDetailsEntraSyncAction.test.tsverifying the Entra client action is hidden whenentra-integration-client-sync-actionis disabled. - Validation commands:
cd packages/clients && npx vitest run src/components/clients/clientDetailsEntraSyncAction.test.tsandnpx tsc --noEmit -p packages/clients/tsconfig.json(pass). - (2026-02-20)
T009completed: extracted Entra settings gate helpers inee/server/src/components/settings/integrations/entraIntegrationSettingsGates.tsand wiredEntraIntegrationSettingsto use helper-based connection option composition. - Added test
server/src/test/unit/components/integrations/entraIntegrationSettingsGates.test.tsasserting CIPP option is omitted whenentra-integration-cippis disabled and included when enabled. - Validation commands:
cd server && npx vitest run src/test/unit/components/integrations/entraIntegrationSettingsGates.test.tsandnpx tsc --noEmit -p ee/server/tsconfig.json(pass). - (2026-02-20)
T010completed: extendedentraIntegrationSettingsGatestest coverage to verifyshouldShowFieldSyncControls(false)andshouldShowAmbiguousQueue(false)both return false. - This covers the advanced Entra UI gating behavior for field-sync and ambiguous-queue sections when their flags are disabled.
- Validation command:
cd server && npx vitest run src/test/unit/components/integrations/entraIntegrationSettingsGates.test.ts(pass). - (2026-02-20)
T011completed: added migration coverage fileserver/src/test/unit/migrations/entraPhase1Migration.test.tswith table/column assertions forentra_partner_connections. - Test validates required Entra partner-connection columns and defaults exist in
ee/server/migrations/20260220143000_create_entra_phase1_schema.cjs. - Validation command:
cd server && npx vitest run src/test/unit/migrations/entraPhase1Migration.test.ts(pass). - (2026-02-20)
T012completed: extendedentraPhase1Migration.test.tsto assert the partial unique index enforcing one active partner connection per tenant. - Validation command:
cd server && npx vitest run src/test/unit/migrations/entraPhase1Migration.test.ts(pass). - (2026-02-20)
T013completed: extendedentraPhase1Migration.test.tswithentra_managed_tenantstable/column checks plus discovery/matching index assertions. - Validation command:
cd server && npx vitest run src/test/unit/migrations/entraPhase1Migration.test.ts(pass). - (2026-02-20)
T014completed: extended migration tests forentra_client_tenant_mappingstable and unique-active mapping constraint index (ux_entra_client_tenant_mappings_active). - Validation command:
cd server && npx vitest run src/test/unit/migrations/entraPhase1Migration.test.ts(pass). - (2026-02-20)
T015completed: added migration assertions forentra_sync_settingsdefaults (sync_enabled=true,sync_interval_minutes=1440) and JSON config fields/index. - Validation command:
cd server && npx vitest run src/test/unit/migrations/entraPhase1Migration.test.ts(pass). - (2026-02-20)
T016completed: extended migration coverage forentra_sync_runsstatus defaults and summary counters (total/processed/succeeded/failed). - Validation command:
cd server && npx vitest run src/test/unit/migrations/entraPhase1Migration.test.ts(pass). - (2026-02-20)
T017completed: extended migration coverage forentra_sync_run_tenantsand tenant-scoped FK linkage to parententra_sync_runs. - Validation command:
cd server && npx vitest run src/test/unit/migrations/entraPhase1Migration.test.ts(pass). - (2026-02-20)
T018completed: extended migration coverage forentra_contact_linksand its unique Entra identity index (tenant,entra_tenant_id,entra_object_id). - Validation command:
cd server && npx vitest run src/test/unit/migrations/entraPhase1Migration.test.ts(pass). - (2026-02-20)
T019completed: extended migration coverage for the partial unique index enforcing one active Entra link per contact (ux_entra_contact_links_active_contact). - Validation command:
cd server && npx vitest run src/test/unit/migrations/entraPhase1Migration.test.ts(pass). - (2026-02-20)
T020completed: extended migration coverage forentra_contact_reconciliation_queuetable defaults and status/identity lookup indexes. - Validation command:
cd server && npx vitest run src/test/unit/migrations/entraPhase1Migration.test.ts(pass). - (2026-02-20)
T021completed: extended migration coverage forclients.entra_tenant_id/clients.entra_primary_domaincolumns andidx_clients_entra_tenant. - Validation command:
cd server && npx vitest run src/test/unit/migrations/entraPhase1Migration.test.ts(pass). - (2026-02-20)
T022completed: extended migration coverage for all Entra contact identity/sync metadata columns (entra_object_id, sync source/status fields, account-enabled flag, and last sync timestamp). - Validation command:
cd server && npx vitest run src/test/unit/migrations/entraPhase1Migration.test.ts(pass). - (2026-02-20)
T023completed: extended migration coverage for tenant backfill of defaultentra_sync_settingsrows (INSERT ... SELECT FROM tenants WHERE NOT EXISTS). - Validation command:
cd server && npx vitest run src/test/unit/migrations/entraPhase1Migration.test.ts(pass). - (2026-02-20)
T024completed: added interface/schema alignment testserver/src/test/unit/integrations/entraInterfacesSchemaAlignment.test.ts. - Test validates Entra row mappers produce all typed interface shapes and cross-checks representative interface-backed columns against migration schema text.
- Validation command:
cd server && npx vitest run src/test/unit/integrations/entraInterfacesSchemaAlignment.test.ts(pass). - (2026-02-20)
T025completed: addedserver/src/test/unit/integrations/entraMappingValidation.test.tsfor duplicate managed-tenant assignment conflict detection. - Validation command:
cd server && npx vitest run src/test/unit/integrations/entraMappingValidation.test.ts(pass). - (2026-02-20)
T026completed: added route contract testserver/src/test/unit/api/entraMappingAndDisconnectContracts.test.tsasserting unmap path deactivates/reinserts mapping state and does not touch sync run history tables. - Validation command:
cd server && npx vitest run src/test/unit/api/entraMappingAndDisconnectContracts.test.ts(pass). - (2026-02-20)
T027completed: extended route contract coverage to assert remap delegatesmappingState='mapped'to confirm service and that confirm service updates client Entra linkage fields. - Validation command:
cd server && npx vitest run src/test/unit/api/entraMappingAndDisconnectContracts.test.ts(pass). - (2026-02-20)
T028completed: extended route contract coverage for disconnect path to assert credential clearing + connection status update without touching sync history tables. - Validation command:
cd server && npx vitest run src/test/unit/api/entraMappingAndDisconnectContracts.test.ts(pass). - (2026-02-20)
T029completed: extended migration coverage to assert Entra contact metadata columns are added viaensureColumndefinitions without new non-null constraints. - Validation command:
cd server && npx vitest run src/test/unit/migrations/entraPhase1Migration.test.ts(pass). - (2026-02-20)
T030completed: added query/index alignment regression testserver/src/test/unit/integrations/entraMappingQueryIndexAlignment.test.ts. - Test enforces tenant-scoped managed-tenant preview query shape and active mapping lookup predicates that align with migration indexes (
idx_entra_managed_tenants_*,ux_entra_client_tenant_mappings_active). - Validation command:
cd server && npx vitest run src/test/unit/integrations/entraMappingQueryIndexAlignment.test.ts(pass). - (2026-02-20)
T031completed: added action permission unit testserver/src/test/unit/integrations/entraActions.directConnect.test.tsforinitiateEntraDirectOAuth. - Test asserts callers lacking
system_settings.updatereceive explicit forbidden response and verifies RBAC check invocation. - Validation command:
cd server && npx vitest run src/test/unit/integrations/entraActions.directConnect.test.ts(pass). - (2026-02-20)
T032completed: extendedserver/src/test/unit/integrations/entraActions.directConnect.test.tswith success-path OAuth initiation assertions. - Test validates returned auth URL shape and verifies base64
statepayload includes tenant/user, nonce, timestamp, and Entra direct integration markers. - Validation command:
cd server && npx vitest run src/test/unit/integrations/entraActions.directConnect.test.ts(pass). - (2026-02-20)
T033completed: added EE callback validation testee/server/src/__tests__/unit/entraOAuthCallback.validation.test.tscovering missing params and invalid state payload handling. - Added
NextResponse.redirect(...)support to shared Next.js test stub (server/src/test/stubs/next-server.ts) so callback routes can be asserted via redirectlocationheaders in unit tests. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraOAuthCallback.validation.test.ts(pass). - (2026-02-20)
T034completed: extended EE callback unit test to cover successful token exchange and connection activation flow. - Assertions verify callback writes direct token references via
saveEntraDirectTokenSet(...), deactivates prior active connection rows, and inserts a new active direct partner connection record. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraOAuthCallback.validation.test.ts(pass). - (2026-02-20)
T035completed: addedee/server/src/__tests__/unit/entraDirectTokenRefresh.test.tsfor direct refresh persistence behavior. - Test freezes time and verifies refreshed access token + computed expiry timestamp are persisted through
saveEntraDirectTokenSet(...)after token endpoint response. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraDirectTokenRefresh.test.ts(pass). - (2026-02-20)
T036completed: extendedserver/src/test/unit/integrations/entraActions.directConnect.test.tswith CIPP base-URL validation coverage. - Test verifies invalid CIPP URL input is rejected with explicit validation error before credential cleanup/persistence side effects.
- Validation command:
cd server && npx vitest run src/test/unit/integrations/entraActions.directConnect.test.ts(pass). - (2026-02-20)
T037completed: expanded CIPP connect action tests to validate secret storage behavior. - Success-path test verifies API token is saved via
saveEntraCippCredentials(...)and DB insert stores onlytoken_secret_ref='entra_cipp'(no plaintext token value). - Validation command:
cd server && npx vitest run src/test/unit/integrations/entraActions.directConnect.test.ts(pass). - (2026-02-20)
T038completed: added EE route unit testee/server/src/__tests__/unit/entraValidateDirectRoute.test.tsfor direct validation success path. - Test verifies valid credential/token context yields managed-tenant probe success, returns
valid=true, and updates connection validation status toconnected. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraValidateDirectRoute.test.ts(pass). - (2026-02-20)
T039completed: added EE route unit testee/server/src/__tests__/unit/entraValidateCippRoute.test.tsfor CIPP validation success path. - Test verifies successful tenant endpoint probe with valid CIPP token returns
valid=true/tenant sample count and marks connection validation statusconnected. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraValidateCippRoute.test.ts(pass). - (2026-02-20)
T040completed: added EE disconnect route unit testee/server/src/__tests__/unit/entraDisconnectRoute.test.ts. - Test verifies both provider secret clear operations execute and active connection is marked disconnected (
disconnectActiveEntraConnection) with expected response payload. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraDisconnectRoute.test.ts(pass). - (2026-02-20)
T041completed: expanded Entra action tests for connection-type switching cleanup behavior. - Test verifies direct initiation clears stale CIPP credentials and CIPP connect clears stale direct token secrets before persisting new mode configuration.
- Validation command:
cd server && npx vitest run src/test/unit/integrations/entraActions.directConnect.test.ts(pass). - (2026-02-20)
T042completed: added resolver precedence unit coverage inee/server/src/__tests__/unit/microsoftCredentialResolver.precedence.test.ts. - Tenant-secret preference case asserts tenant credential pair is selected over env/app fallbacks when present.
- Validation command:
cd ee/server && npx vitest run src/__tests__/unit/microsoftCredentialResolver.precedence.test.ts(pass). - (2026-02-20)
T043completed withinmicrosoftCredentialResolver.precedencetests. - Env-fallback case asserts resolver returns env credentials when tenant secret pair is absent and does not query app-secret fallback.
- Validation command:
cd ee/server && npx vitest run src/__tests__/unit/microsoftCredentialResolver.precedence.test.ts(pass). - (2026-02-20)
T044completed withinmicrosoftCredentialResolver.precedencetests. - App-secret fallback case asserts resolver returns app-secret credentials when neither tenant secrets nor env credentials are available.
- Validation command:
cd ee/server && npx vitest run src/__tests__/unit/microsoftCredentialResolver.precedence.test.ts(pass). - (2026-02-20)
T045completed: addedee/server/src/__tests__/unit/entraSecretKeys.test.tsvalidating canonical Entra secret key constants. - Test verifies shared/direct/CIPP secret key names are stable and fully represented exactly once in
ENTRA_ALL_SECRET_KEYS. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraSecretKeys.test.ts(pass). - (2026-02-20)
T046completed: added provider-factory unit coverage inee/server/src/__tests__/unit/entraProviderFactory.test.ts. - Direct selection case asserts
getEntraProviderAdapter('direct')delegates tocreateDirectProviderAdapter()and returns its adapter instance. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraProviderFactory.test.ts(pass). - (2026-02-20)
T047completed inentraProviderFactorytests. - CIPP selection case asserts
getEntraProviderAdapter('cipp')delegates tocreateCippProviderAdapter()and returns its adapter instance. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraProviderFactory.test.ts(pass). - (2026-02-20)
T048completed: added direct adapter normalization tests inee/server/src/__tests__/unit/directProviderAdapter.normalization.test.ts. - Managed-tenant case verifies Graph payload normalization into canonical fields (
entraTenantId,displayName,primaryDomain,sourceUserCount). - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/directProviderAdapter.normalization.test.ts(pass). - (2026-02-20)
T049completed in direct adapter normalization tests. - User-list case verifies canonical sync-user mapping (UPN/email fallback, trimmed identity fields, boolean normalization, and business phone filtering).
- Validation command:
cd ee/server && npx vitest run src/__tests__/unit/directProviderAdapter.normalization.test.ts(pass). - (2026-02-20)
T050completed: added CIPP adapter normalization coverage inee/server/src/__tests__/unit/cippProviderAdapter.normalization.test.ts. - Tenant-list case verifies CIPP tenant payloads normalize into canonical managed-tenant DTO fields with expected auth header usage.
- Validation command:
cd ee/server && npx vitest run src/__tests__/unit/cippProviderAdapter.normalization.test.ts(pass). - (2026-02-20)
T051completed in CIPP adapter normalization tests. - User-list case verifies canonical sync-user normalization (identity fields, booleans, trimmed strings, and phone filtering) for CIPP responses.
- Validation command:
cd ee/server && npx vitest run src/__tests__/unit/cippProviderAdapter.normalization.test.ts(pass). - (2026-02-20)
T052completed: added discovery upsert unit coverage inee/server/src/__tests__/unit/entraDiscoveryService.upsert.test.ts. - Test verifies discovery persists managed-tenant rows via tenant-scoped upsert (
onConflict(['tenant','entra_tenant_id']).merge(...)) and returns idempotent discovered tenant results. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraDiscoveryService.upsert.test.ts(pass). - (2026-02-20)
T053completed inee/server/src/__tests__/unit/entraDiscoveryService.upsert.test.ts. - Merge-update case asserts discovery upsert writes
display_nameandprimary_domainfromEXCLUDEDvalues, covering changed tenant metadata refresh behavior. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraDiscoveryService.upsert.test.ts(pass). - (2026-02-20)
T054completed inee/server/src/__tests__/unit/entraDiscoveryService.upsert.test.ts. - Source-user-count coverage asserts discovery writes
source_user_counton insert rows and merge updates so provider-reported tenant user totals stay current. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraDiscoveryService.upsert.test.ts(pass). - (2026-02-20)
T055completed: added mapping preview unit suiteee/server/src/__tests__/unit/entraMappingPreviewService.test.ts. - Exact-domain case asserts a single exact domain match is surfaced in
autoMatchedwithreason='exact_domain'and no fuzzy/unmatched spillover. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraMappingPreviewService.test.ts(pass). - (2026-02-20)
T056completed inentraMappingPreviewServiceunit suite. - Secondary-domain case asserts candidate generation uses
reason='secondary_domain'and confidence score0.88for non-primary domain matches. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraMappingPreviewService.test.ts(pass). - (2026-02-20)
T057completed inentraMappingPreviewServiceunit suite. - Fuzzy candidate case verifies candidates are score-sorted descending and remain non-auto-confirmed (
autoMatch=false), ensuring fuzzy suggestions never silently map. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraMappingPreviewService.test.ts(pass). - (2026-02-20)
T058completed inentraMappingPreviewServiceunit suite. - No-match case confirms tenants are returned in
unmatchedwhen neither domain nor fuzzy thresholds produce candidates. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraMappingPreviewService.test.ts(pass). - (2026-02-20)
T059completed: added jsdom component testee/server/src/__tests__/unit/entraTenantMappingTable.selection.test.tsx. - Test renders
EntraTenantMappingTable, loads fuzzy + unmatched preview rows, and verifies client selection updates both row comboboxes (needs_reviewandunmatched) with mapped summary callback updates. - Added EE Vitest alias coverage for
@alga-psa/integrations/*and@alga-psa/clients/*inee/server/vitest.config.tsso component imports resolve consistently in unit tests. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraTenantMappingTable.selection.test.tsx(pass). - (2026-02-20)
T060completed: extendedserver/src/test/unit/integrations/entraActions.directConnect.test.tswith skip-mapping action coverage. - Test validates
skipEntraTenantMappingdeactivates prior active rows, inserts activeskip_for_nowrow withclient_id: null, and returns expected skip state payload (no active client mapping created). - Validation command:
cd server && npx vitest run src/test/unit/integrations/entraActions.directConnect.test.ts(pass). - (2026-02-20)
T061completed inee/server/src/__tests__/unit/entraTenantMappingTable.selection.test.tsx. - Bulk preselect test clicks
Preselect Exact Matchesand verifies eachauto_matchedrow select is populated with its exact-domain candidate client ID. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraTenantMappingTable.selection.test.tsx(pass). - (2026-02-20)
T062completed: extendedserver/src/test/unit/api/entraMappingAndDisconnectContracts.test.tswith confirm/preview write-path contract assertions. - Coverage asserts confirm route only processes explicit
body.mappingsinput and confirm service iteratesparams.mappings; preview route remains read-only (buildEntraMappingPreviewonly, no insert/update). - Validation command:
cd server && npx vitest run src/test/unit/api/entraMappingAndDisconnectContracts.test.ts(pass). - (2026-02-20)
T063completed: added service-level unit testee/server/src/__tests__/unit/confirmEntraMappingsService.clientLink.test.ts. - Test executes
confirmEntraMappingswith a mapped selection and verifies client row update writesentra_tenant_id+entra_primary_domainfrom managed-tenant lookup. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/confirmEntraMappingsService.clientLink.test.ts(pass). - (2026-02-20)
T064completed inconfirmEntraMappingsService.clientLinkunit suite. - Remap scenario asserts existing active mapping is deactivated (
is_active=false) before inserting one new active mapped row for the target client. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/confirmEntraMappingsService.clientLink.test.ts(pass). - (2026-02-20)
T065completed: expandedentraTenantMappingTable.selectioncomponent tests with summary counter assertions. - Mixed-state scenario verifies
onSummaryChangetransitions from{mapped:1, skipped:0, needsReview:1}to{mapped:1, skipped:1, needsReview:0}after skip action. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraTenantMappingTable.selection.test.tsx(pass). - (2026-02-20)
T066completed: addedee/server/src/__tests__/unit/entraIntegrationSettings.initialSyncCta.test.tsx. - jsdom test mocks feature flags/status actions and asserts
Run Initial Syncremains disabled whenmappedTenantCount=0. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraIntegrationSettings.initialSyncCta.test.tsx(pass). - (2026-02-20)
T067completed inentraIntegrationSettings.initialSyncCtaunit suite. - Mocked mapping-table callback state drives skipped-tenant panel rendering; test verifies skipped entries appear with
Remapcontrols. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraIntegrationSettings.initialSyncCta.test.tsx(pass). - (2026-02-20)
T068completed inentraIntegrationSettings.initialSyncCtatests. - Flag-off scenario verifies disabled-state messaging renders while wizard content (
Map Tenants to Clients) and sync CTA controls are absent. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraIntegrationSettings.initialSyncCta.test.tsx(pass). - (2026-02-20)
T069completed: added Entra Temporal type-contract testserver/src/test/unit/temporal/entraTemporalTypeContracts.test.tsand tightened Entra activity typing. - Removed
anyleak inee/temporal-workflows/src/activities/entra-sync-activities.tsby introducing typed row mapping; discovery workflow/activity now consume sharedtypes/entra-syncinterfaces (DiscoverManagedTenants*,EntraDiscoveryWorkflowResult). - Validation commands:
cd server && npx vitest run src/test/unit/temporal/entraTemporalTypeContracts.test.ts --coverage.enabled=false(pass),cd ee/temporal-workflows && npm run type-check(pass). - (2026-02-20)
T070completed: added Temporal contract suiteserver/src/test/unit/temporal/entraWorkflowActivityContracts.test.ts. - Discovery workflow assertion verifies start-log ->
discoverManagedTenantsActivity-> completion-log ordering. - Validation command:
cd server && npx vitest run src/test/unit/temporal/entraWorkflowActivityContracts.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T071completed in Temporal workflow/activity contract suite. - Initial-sync assertion verifies mapped-tenant load precedes per-tenant loop and tenant sync activity invocation.
- Validation command:
cd server && npx vitest run src/test/unit/temporal/entraWorkflowActivityContracts.test.ts --coverage.enabled=false(pass). EOF && git add ee/docs/plans/2026-02-20-entra-integration-phase-1/tests.json ee/docs/plans/2026-02-20-entra-integration-phase-1/SCRATCHPAD.md && git commit -m "test(T071): verify initial-sync workflow load-and-process order"- (2026-02-20)T072completed in Temporal workflow/activity contract suite. - Tenant-sync assertion verifies workflow filters selected mapping by requested
managedTenantIdand optionalclientIdscope before processing. - Validation command:
cd server && npx vitest run src/test/unit/temporal/entraWorkflowActivityContracts.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T073completed in Temporal workflow/activity contract suite. - All-tenants workflow assertion verifies it loads mapped tenants and iterates
mappedTenants.mappingsfor per-tenant sync execution. - Validation command:
cd server && npx vitest run src/test/unit/temporal/entraWorkflowActivityContracts.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T074completed in Temporal workflow/activity contract suite. - Upsert-run activity assertions verify parent sync run writes include initiating user attribution and run mode fields (
run_type,initiated_by). - Validation command:
cd server && npx vitest run src/test/unit/temporal/entraWorkflowActivityContracts.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T075completed in Temporal workflow/activity contract suite. - Record-tenant-result assertions verify per-tenant run row persistence includes status + all sync counters (
created/linked/updated/ambiguous/inactivated). - Validation command:
cd server && npx vitest run src/test/unit/temporal/entraWorkflowActivityContracts.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T076completed in Temporal workflow/activity contract suite. - Finalize-run assertions verify terminal status and summary totals are written back to parent
entra_sync_runsrows. - Validation command:
cd server && npx vitest run src/test/unit/temporal/entraWorkflowActivityContracts.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T077completed in Temporal workflow/activity contract suite. - Workflow index assertions verify Entra workflow exports are present in
ee/temporal-workflows/src/workflows/index.tsfor worker registration. - Validation command:
cd server && npx vitest run src/test/unit/temporal/entraWorkflowActivityContracts.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T078completed in Temporal workflow/activity contract suite. - Activity index assertions verify Entra activity exports are present in
ee/temporal-workflows/src/activities/index.tsfor worker registration. - Validation command:
cd server && npx vitest run src/test/unit/temporal/entraWorkflowActivityContracts.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T079completed: added workflow-client start tests inee/server/src/__tests__/unit/entraWorkflowClient.start.test.ts. - Initial-sync case verifies Temporal start wrapper returns
available=truewith workflow/run IDs and generates the expected initial-sync workflow-id prefix. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraWorkflowClient.start.test.ts(pass). - (2026-02-20)
T080completed inentraWorkflowClient.startunit suite. - All-tenants case verifies Temporal start wrapper returns workflow/run IDs and includes trigger-scoped all-tenants workflow-id prefix.
- Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraWorkflowClient.start.test.ts(pass). - (2026-02-20)
T081completed inentraWorkflowClient.startunit suite. - Single-tenant case verifies Temporal start wrapper returns workflow/run IDs and composes tenant+managed-tenant+client workflow-id prefix.
- Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraWorkflowClient.start.test.ts(pass). - (2026-02-20)
T082completed: added route unit testee/server/src/__tests__/unit/entraSyncRunProgressRoute.test.ts. - Test verifies sync run polling endpoint returns serialized run-level status plus tenant-level result rows and calls workflow progress reader with tenant-scoped context.
- Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraSyncRunProgressRoute.test.ts(pass). - (2026-02-20)
T083completed: added contract testserver/src/test/unit/integrations/entraConfirmMappingsInitialSyncContract.test.ts. - Test verifies
confirmEntraMappingsoptional-start branch, workflow trigger invocation path, and response payload propagation ofinitialSync.workflowId/runId. - Validation commands:
cd server && npx vitest run src/test/unit/integrations/entraConfirmMappingsInitialSyncContract.test.ts --coverage.enabled=false(pass),cd server && npx vitest run src/test/unit/integrations/entraActions.directConnect.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T084completed: addedserver/src/test/unit/integrations/entraActions.startSync.test.ts. - All-tenants case verifies manual
startEntraSync({scope:'all-tenants'})dispatchesstartEntraAllTenantsSyncWorkflowwith trigger=manualand returns workflow/run IDs. - Validation command:
cd server && npx vitest run src/test/unit/integrations/entraActions.startSync.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T085completed inentraActions.startSyncunit suite. - Single-client case verifies
startEntraSync({scope:'single-client'})resolves mapped tenant context then dispatchesstartEntraTenantSyncWorkflowwith expected identifiers. - Validation command:
cd server && npx vitest run src/test/unit/integrations/entraActions.startSync.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T086completed in Temporal workflow/activity contract suite. - Schedule assertions verify tenant-scoped Entra recurring schedule creation path for enabled tenants with active connections, using scheduled all-tenants workflow trigger config.
- Validation command:
cd server && npx vitest run src/test/unit/temporal/entraWorkflowActivityContracts.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T087completed in Temporal workflow/activity contract suite. upsertScheduleassertions verify already-existing schedules are updated viahandle.update(...)with refreshed spec/action/policy definitions.- Validation command:
cd server && npx vitest run src/test/unit/temporal/entraWorkflowActivityContracts.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T088completed inentraWorkflowClient.startunit suite. - Added collision test verifying repeated manual trigger inputs generate identical workflow IDs and that
WorkflowExecutionAlreadyStartedErrorresolves to existing run identifiers via handle describe. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraWorkflowClient.start.test.ts(pass). - (2026-02-20)
T089completed in Temporal workflow/activity contract suite. - Added no-mapped-tenant assertions for initial/all-tenants workflows to ensure zero-initialized summaries and completed status path when nothing is processed.
- Validation command:
cd server && npx vitest run src/test/unit/temporal/entraWorkflowActivityContracts.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T090completed in Temporal workflow/activity contract suite. - Failure-path assertions verify per-tenant catch blocks emit failed tenant results and parent run status rolls up to
partial/failedaccording to succeeded-vs-failed counts. - Validation command:
cd server && npx vitest run src/test/unit/temporal/entraWorkflowActivityContracts.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T091completed: added user-filter pipeline unit suiteee/server/src/__tests__/unit/entraUserFilterPipeline.test.ts. - Disabled-user case verifies
accountEnabled=falseidentities are excluded with reasonaccount_disabled. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraUserFilterPipeline.test.ts(pass). - (2026-02-20)
T092completed inentraUserFilterPipelinesuite. - Missing-identity case verifies users without valid UPN/email identities are excluded with
missing_identityreason. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraUserFilterPipeline.test.ts(pass). - (2026-02-20)
T093completed inentraUserFilterPipelinesuite. - Default service-account pattern case verifies identities like
svc-*are filtered from sync candidates withservice_accountreason. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraUserFilterPipeline.test.ts(pass). - (2026-02-20)
T094completed inentraUserFilterPipelinesuite. - Tenant custom pattern case verifies configured exclusions are applied on top of defaults and produce
tenant_custom_patternfiltered results. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraUserFilterPipeline.test.ts(pass). - (2026-02-20)
T095completed: added reconciler/matcher unit suites (ee/server/src/__tests__/unit/entraContactReconciler.test.ts,ee/server/src/__tests__/unit/entraContactMatcher.noEmailAutoLink.test.ts). - Exact-email-match case verifies reconcile flow links existing contact and avoids duplicate contact creation.
- Validation commands:
cd ee/server && npx vitest run src/__tests__/unit/entraContactReconciler.test.ts(pass),cd ee/server && npx vitest run src/__tests__/unit/entraContactMatcher.noEmailAutoLink.test.ts(pass). - (2026-02-20)
T096completed inentraContactReconcilerunit suite. - No-match case verifies reconcile flow creates a new contact under the mapped client before linking Entra identity metadata.
- Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraContactReconciler.test.ts(pass). - (2026-02-20)
T097completed inentraContactReconcilerunit suite. - Ambiguous-match case verifies multiple candidates queue reconciliation items instead of auto-linking/creation.
- Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraContactReconciler.test.ts(pass). - (2026-02-20)
T098completed inentraContactMatcher.noEmailAutoLinktest. - Name-only identity case verifies missing valid email/UPN cannot auto-link contacts.
- Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraContactMatcher.noEmailAutoLink.test.ts(pass). - (2026-02-20)
T099completed inentraContactReconcilerunit suite. - Metadata-write assertions verify contact update patches include Entra identity/source fields during link/create reconciliation paths.
- Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraContactReconciler.test.ts(pass). - (2026-02-20)
T100completed: addedee/server/src/__tests__/unit/entraContactFieldSync.test.ts. - Toggle-off case verifies
displayName=falsepreventsfull_nameoverwrite patch generation. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraContactFieldSync.test.ts(pass). - (2026-02-20)
T101completed inentraContactFieldSynctest suite. - Toggle-on case verifies
displayName=trueincludesfull_nameoverwrite patch from Entra display name. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraContactFieldSync.test.ts(pass). - (2026-02-20)
T102completed inentraContactFieldSynctest suite. - Toggle-on UPN case verifies
upn=trueincludesentra_user_principal_nameoverwrite patch generation for linked contacts. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraContactFieldSync.test.ts(pass). - (2026-02-20)
T103completed: addedee/server/src/__tests__/unit/entraDisableHandler.test.ts. - Disabled-user handling assertion verifies linked contacts are marked inactive with
entra_sync_status_reason='disabled_upstream'and link status is set inactive. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraDisableHandler.test.ts(pass). - (2026-02-20)
T104completed inee/server/src/__tests__/unit/entraDisableHandler.test.ts. - Deleted-user handling assertion verifies linked contacts are marked inactive with
entra_sync_status_reason='deleted_upstream'. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraDisableHandler.test.ts(pass). - (2026-02-20)
T105completed inee/server/src/__tests__/unit/entraDisableHandler.test.ts. - Non-destructive handling assertion verifies disabled/deleted paths only issue update operations and never delete contact or link rows.
- Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraDisableHandler.test.ts(pass). - (2026-02-20)
T106completed inee/server/src/__tests__/unit/entraContactReconciler.test.ts. - Added assertions for both linked and created reconcile paths to verify
last_entra_sync_atis refreshed on every processed contact row. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraContactReconciler.test.ts(pass). - (2026-02-20)
T107completed: addedee/server/src/__tests__/unit/entraContactLinkRepository.test.ts. - Upsert contract assertions verify link rows refresh
last_seen_atand remainlink_status='active'/is_active=trueon each sync merge. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraContactLinkRepository.test.ts(pass). - (2026-02-20)
T108completed: addedee/server/src/__tests__/unit/entraSyncResultAggregator.test.ts. - Created-counter assertions verify aggregation correctness across
increment+add, and ignore non-positive deltas. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraSyncResultAggregator.test.ts(pass). - (2026-02-20)
T109completed inee/server/src/__tests__/unit/entraSyncResultAggregator.test.ts. - Linked-counter assertions verify accurate totals from
incrementandadd, while ignoring invalid numeric deltas. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraSyncResultAggregator.test.ts(pass). - (2026-02-20)
T110completed inee/server/src/__tests__/unit/entraSyncResultAggregator.test.ts. - Ambiguous-counter assertions verify per-tenant accumulation semantics and counter isolation from unrelated totals.
- Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraSyncResultAggregator.test.ts(pass). - (2026-02-20)
T111completed: addedee/server/src/__tests__/unit/entraSyncEngine.dryRun.test.ts. - Dry-run engine assertions verify ambiguous/linked/created preview counters while ensuring no write-path reconciliation methods execute.
- Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraSyncEngine.dryRun.test.ts(pass). - (2026-02-20)
T112completed: addedee/server/src/__tests__/unit/entraSyncResultSerializer.test.ts. - Serializer stability assertions compare key-shape parity for success vs failure runs and verify numeric/null normalization for tenant result DTOs.
- Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraSyncResultSerializer.test.ts(pass). - (2026-02-20)
T113completed inee/server/src/__tests__/unit/entraContactLinkRepository.test.ts. - Retry/idempotency assertion uses a conflict-aware fake transaction store to verify repeated sync upserts keep one row per (
tenant,entra_tenant_id,entra_object_id) identity key. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraContactLinkRepository.test.ts(pass). - (2026-02-20)
T114completed inee/server/src/__tests__/unit/entraContactReconciler.test.ts. - Retry-idempotency case simulates two sync passes for the same Entra identity and verifies only one contact is created; second pass links existing contact.
- Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraContactReconciler.test.ts(pass). - (2026-02-20)
T115completed: addedee/server/src/__tests__/unit/entraReconciliationQueueService.queue.test.ts. - Queue insert assertions validate tenant/client/managed-tenant context plus serialized candidate-contact details and ambiguity payload (
reason,candidateCount). - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraReconciliationQueueService.queue.test.ts(pass). - (2026-02-20)
T116completed: addedee/server/src/__tests__/unit/entraReconciliationQueueService.resolve.test.ts. - Resolve-to-existing assertions verify Entra identity linking and queue state transition to
resolvedwithresolution_action='link_existing'. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraReconciliationQueueService.resolve.test.ts(pass). - (2026-02-20)
T117completed inee/server/src/__tests__/unit/entraReconciliationQueueService.resolve.test.ts. - Resolve-to-new assertions verify normalized contact creation, Entra link upsert, and queue transition to
resolvedwithresolution_action='create_new'. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraReconciliationQueueService.resolve.test.ts(pass). - (2026-02-20)
T118completed inee/server/src/__tests__/unit/entraReconciliationQueueService.resolve.test.ts. - Guard-rail assertions verify resolve-to-existing rejects cross-client targets and rejects contacts outside tenant scope before link writes.
- Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraReconciliationQueueService.resolve.test.ts(pass). - (2026-02-20)
T119completed inserver/src/test/unit/integrations/entraActions.startSync.test.ts. - Single-client sync guard test verifies query scoping to active
mappedrows for requested client and rejects workflow start when no qualifying mapping exists. - Validation command:
cd server && npx vitest run src/test/unit/integrations/entraActions.startSync.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T120completed inserver/src/test/unit/temporal/entraWorkflowActivityContracts.test.ts. - Contract assertion confirms
loadMappedTenantsActivityfilters to activemappedrows, which excludesskip_for_nowmappings from all-tenant sync. - Validation command:
cd server && npx vitest run src/test/unit/temporal/entraWorkflowActivityContracts.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T121completed inee/server/src/__tests__/unit/entraIntegrationSettings.initialSyncCta.test.tsx. - Status-panel UI assertions verify rendering of connection state/type, last discovery, mapped tenant count, and configured sync interval text.
- Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraIntegrationSettings.initialSyncCta.test.tsx(pass). - (2026-02-20)
T122completed: addedee/server/src/__tests__/unit/entraSyncHistoryPanel.test.tsx. - History list assertions verify run cards are rendered in descending
startedAtorder regardless of API return order. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraSyncHistoryPanel.test.tsx(pass). - (2026-02-20)
T123completed inee/server/src/__tests__/unit/entraSyncHistoryPanel.test.tsx. - Drilldown test validates fetching run detail and rendering per-tenant outcome rows with created/linked/updated/ambiguous/inactivated counters.
- Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraSyncHistoryPanel.test.tsx(pass). - (2026-02-20)
T124completed inee/server/src/__tests__/unit/entraIntegrationSettings.initialSyncCta.test.tsx. - UI assertion verifies
Sync All Tenants Nowremains disabled whenmappedTenantCountis zero. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraIntegrationSettings.initialSyncCta.test.tsx(pass). - (2026-02-20)
T125completed inee/server/src/__tests__/unit/entraIntegrationSettings.initialSyncCta.test.tsx. - Complementary CTA assertion verifies
Sync All Tenants Nowis enabled when at least one active mapping is present. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraIntegrationSettings.initialSyncCta.test.tsx(pass). - (2026-02-20)
T126completed viapackages/clients/src/components/clients/clientDetailsEntraSyncAction.tsandClientDetails.tsxwiring. - Visibility logic now requires enterprise edition + client-sync flag + mapped client (
entra_tenant_idpresent); unmapped clients do not seeSync Entra Now. - Validation command:
cd packages/clients && npx vitest run src/components/clients/clientDetailsEntraSyncAction.test.ts(pass). - (2026-02-20)
T127completed by extendingclientDetailsEntraSyncActionhelpers and wiring inClientDetails.tsx. - Added tested run-id state resolution (
queued+ polling) and terminal-status detection to keep client sync status feedback/polling behavior deterministic. - Validation command:
cd packages/clients && npx vitest run src/components/clients/clientDetailsEntraSyncAction.test.ts(pass). - (2026-02-20)
T128completed inee/server/src/__tests__/unit/entraIntegrationSettings.initialSyncCta.test.tsx. - Flag-gate assertion verifies ambiguous reconciliation queue panel stays hidden when
entra-integration-ambiguous-queueis disabled. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraIntegrationSettings.initialSyncCta.test.tsx(pass). - (2026-02-20)
T129completed inee/server/src/__tests__/unit/entraIntegrationSettings.initialSyncCta.test.tsx. - Complementary flag test verifies ambiguous reconciliation queue panel renders when
entra-integration-ambiguous-queueis enabled. - Validation command:
cd ee/server && npx vitest run src/__tests__/unit/entraIntegrationSettings.initialSyncCta.test.tsx(pass). - (2026-02-20)
T130completed inserver/src/test/unit/integrations/entraActions.directConnect.test.ts. - Added client-portal denial assertion for Entra settings status action (
Forbidden) to enforce non-internal access boundaries. - Validation command:
cd server && npx vitest run src/test/unit/integrations/entraActions.directConnect.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T131completed inserver/src/test/unit/integrations/entraActions.startSync.test.ts. - Added explicit client-portal rejection assertion for manual sync action entrypoint (
startEntraSync) with no workflow trigger side effects. - Validation command:
cd server && npx vitest run src/test/unit/integrations/entraActions.startSync.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T132completed inserver/src/test/unit/integrations/entraActions.directConnect.test.ts. - Added read-permission denial assertions for both status and mapping-preview actions to enforce
system_settings.readrequirements. - Validation command:
cd server && npx vitest run src/test/unit/integrations/entraActions.directConnect.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T133completed acrossentraActions.directConnect.test.tsandentraActions.startSync.test.ts. - Added update-permission denial assertions for mapping confirmation and manual sync starts; direct-connect update-permission denial remains covered by
T031. - Validation commands:
cd server && npx vitest run src/test/unit/integrations/entraActions.directConnect.test.ts --coverage.enabled=false(pass),cd server && npx vitest run src/test/unit/integrations/entraActions.startSync.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T134completed inserver/src/test/unit/integrations/entraActions.directConnect.test.ts. - Added a full authorized-action contract flow covering direct connect, discovery route, mapping confirm (+optional initial sync start), and manual all-tenants sync start.
- Validation command:
cd server && npx vitest run src/test/unit/integrations/entraActions.directConnect.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T135completed via docs contract testserver/src/test/unit/docs/entraIntegrationGuide.contract.test.ts. - Verified guide includes both direct and CIPP setup paths plus explicit decision guidance for choosing connection type.
- Validation command:
cd server && npx vitest run src/test/unit/docs/entraIntegrationGuide.contract.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T136completed in docs contract suiteserver/src/test/unit/docs/entraIntegrationGuide.contract.test.ts. - Verified documentation enumerates Entra secret names and explicitly notes secret-provider chain compatibility (env/filesystem/vault).
- Validation command:
cd server && npx vitest run src/test/unit/docs/entraIntegrationGuide.contract.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T137completed in docs contract suiteserver/src/test/unit/docs/entraIntegrationGuide.contract.test.ts. - Confirmed guide explicitly documents additive/non-destructive sync defaults and field-sync toggle overwrite controls.
- Validation command:
cd server && npx vitest run src/test/unit/docs/entraIntegrationGuide.contract.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T138completed in docs contract suiteserver/src/test/unit/docs/entraIntegrationGuide.contract.test.ts. - Verified documentation includes recommended feature-flag rollout ordering for pilot/internal tenants before broad enablement.
- Validation command:
cd server && npx vitest run src/test/unit/docs/entraIntegrationGuide.contract.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T139completed inserver/src/test/unit/integrations/entraActions.directConnect.test.ts. - Added flag-off assertion showing settings read path exits early with disabled response and does not touch Entra status/data route paths.
- Validation command:
cd server && npx vitest run src/test/unit/integrations/entraActions.directConnect.test.ts --coverage.enabled=false(pass). - (2026-02-20)
T140completed inpackages/clients/src/components/clients/clientDetailsEntraSyncAction.test.ts. - Added client-flag-off contract assertion for hidden sync entrypoint and preserved run-id status representation helper behavior (non-destructive UI toggle path).
- Validation command:
cd packages/clients && npx vitest run src/components/clients/clientDetailsEntraSyncAction.test.ts(pass).