Entra conditional access for self-hosted customers
Goal
| User story |
|---|
| As a self-hosted Fleet customer, |
| I want to use Entra conditional access |
| so that I can block end users from logging in to third-party tools via Entra when they're failing policies in Fleet. |
Changes
Product
- [x] UI changes: Allow self-managed Fleet instances to configure Entra conditional access via Fleet's UI
- [x] CLI (fleetctl) usage changes: No changes
- [x] YAML changes: No changes
- [x] REST API changes: Allow self-managed Fleet instances to configure Entra conditional access via Fleet's API
- [x] Fleet's agent (fleetd) changes: No changes
- [x] Fleet server configuration changes: Remove support for the current Fleet server configuration that takes the key for Entra conditional access. The Fleet server will now enforce that Fleet Premium instances only can create an Entra integration.
- @noahtalerman: I think we can remove support instead of deprecate because this config isn't publicaly documented.
- [x] Exposed, public API endpoint changes: No changes
- [x] fleetdm.com changes: https://github.com/fleetdm/fleet/issues/47702
- [x] GitOps mode UI changes: No changes
- [x] GitOps generation changes: No changes
- [x] Activity changes: No changes
- [x] Permissions changes: No changes
- [x] Changes to paid features or tiers: Fleet Premium only
- [x] My device and fleetdm.com/better changes: No changes
- [x] Usage statistics: No changes
- [x] Other reference documentation changes: No changes
- [x] First draft of test plan added
- [x] Once shipped, requester has been notified
- [x] Once shipped, dogfooding issue has been filed
Engineering
- [X] Test plan is finalized
- [X] Contributor API changes: No changes.
- [X] Feature guide changes: No changes.
- [X] This is a premium only feature: Yes.
Risk assessment
- Risk level: Low
Test plan
⚠️ IMPORTANT for QA ⚠️
- To be able to test this, this other item must be merged to
mainand Awaiting QA. - We also need to test old Fleet server versions (<= 4.89.0) with the new version of the MS proxy (so it's backwards compatible)
Core flow
Run MS proxy locally (see Conditional access testing). The proxy should allow requests without the API key (a change that will be merged to mainas part of this story).
Premium
- Run Fleet with
FLEET_MICROSOFT_COMPLIANCE_PARTNER_PROXY_URIset to the ngrok of the local MS proxy. - Visit Settings > Integrations > Conditional access.
- Microsoft Entra section should be present.
- Configure the integration as documented in https://fleetdm.com/guides/entra-conditional-access-integration#basic-article.
- Smoke test the conditional access feature with a macOS and a Windows host (end to end to confirm that when the hosts are failing a policy in Fleet, then they are blocked from accessing Entra resources).
Free
- Run Fleet without any special flags.
- Visit Settings > Integrations > Conditional access.
- Microsoft Entra section should be missing.
Premium gating (if this is a premium-only feature)
- [ ] Verify the feature is blocked on Fleet Free in the frontend (UI hidden/disabled with appropriate messaging)
- [ ] Verify the feature is blocked on Fleet Free in the backend (API returns the expected error, not just hidden in the UI)
Confirmation
- [X] Engineer: Added comment to user story confirming successful completion of test plan (include any special setup, test data, or configuration used during development/testing if applicable).
- [x] QA: Added comment to user story confirming successful completion of test plan.
- [ ] QA: Determined whether this story needs Playwright automation.
- Needs automation: Yes / No
- If yes, filed a follow-up issue in the :help-qa project with status "Needs automation":
- [x] Fleet server configuration changes: Remove support for the current Fleet server configuration that takes the key for Entra conditional access. The Fleet server will now enforce that Fleet Premium instances only can create an Entra integration.
- @noahtalerman: I think we can remove support instead of deprecate because this config isn't publicaly documented.
FYI @rfairburn @rachaelshaw here's where we landed. I think we target 4.89. I tracked an issue on the :help-customers board to remove the server config from cloud instances and notify self-managed customers: https://github.com/fleetdm/confidential/issues/16450
cc @lucasmrod @eashaw @ddribeiro
Validation — fleetdm/fleet#47699
Verdict: ✅ FULLY VALIDATED, including a live end-to-end device-compliance smoke test.
- Impl: PR #49414 "Allow Microsoft conditional access on premium self-hosted", commit
da3f30df79. Companion website/proxy: #49434; docs #49435. - On RC:
git merge-base --is-ancestor da3f30df79 HEAD→ YES ✅; changes file47699-entra-conditional-access-self-hostedpresent. - Tested against: self-hosted fleetqa (4.90.0-rc, Premium) + a local Free instance + the real dev Entra tenant
fleettest.onmicrosoft.com.
1. What changed (code review)
-
Gate moved from server-config → Premium license.
server/service/conditional_access_microsoft.go: Create/Confirm/Delete previously requiredconfig.MicrosoftCompliancePartner.IsSet()(cloud-only); now requirelic.IsPremium(), returningfleet.ErrMissingLicenseotherwise. Get returns nil when not Premium.- if !svc.config.MicrosoftCompliancePartner.IsSet() { return "", &BadRequestError{...} } + if lic, _ := license.FromContext(ctx); lic == nil || !lic.IsPremium() { return "", fleet.ErrMissingLicense } -
Removed
microsoft_compliance_partner.proxy_api_key(config.go, serve.go) — the proxy no longer requires the key (companion #49434). -
Removed the cloud-only
managed_cloudsignal —service_appconfig.gono longer deriveslicense.managed_cloud;config.tsdropped the field;ConditionalAccess.tsxremoved theisManagedCloud &&guard so the Entra section renders for any Premium instance. The whole card is Premium-gated atif (!isPremiumTier) return <PremiumFeatureMessage/>.
2. Premium gating — verified live (frontend + backend)
| Check | Result |
|---|---|
| Premium (self-hosted fleetqa) UI: Settings → Integrations → Conditional access | ✅ Microsoft Entra section present (with Okta), each with a Connect button |
Premium backend: POST /conditional-access/microsoft |
✅ passes the license gate (fails only reaching the proxy; nothing persisted) |
| Free (local instance) UI | ✅ Entra section absent, PremiumFeatureMessage shown, no Connect buttons |
| Free backend: create / delete / confirm | ✅ all HTTP 402 "Requires Fleet Premium license" (ErrMissingLicense) |
TestIntegrations/TestConditionalAccessRequiresPremium (integration test) |
✅ PASS |
3. Self-hosted Connect flow — proven live end-to-end
| Step | Evidence |
|---|---|
| Self-hosted Premium Fleet → Connect (UI + API) | tenant ID stored; UI Save launches Microsoft sign-in |
| Proxy accepts request without API key (was 401 → now 200) | proxy returns a valid microsoft_authentication_url (admin-consent URL) |
Admin consent completed (correct tenant admin [email protected]) |
proxy log: GET /adminconsent (302) "admin consent status successfully updated" |
| Proxy tenant record | adminConsented: true, setupCompleted: true, no error |
| Fleet integration state | microsoft_entra_connection_configured: **true** |
| Fleet UI | ✅ green check: "Microsoft Entra conditional access connected." |
4. Device-compliance smoke test — PROVEN live against dev Entra
| Setup | Value |
|---|---|
| Entra device | deviceId xyz, user [email protected]` |
| Mapping | microsoft_compliance_partner_host_statuses(host 1 → device, upn) |
| CA policy | No-team darwin policy, conditional_access_enabled: true, that the host fails |
| Step | Evidence |
|---|---|
| Host fails the CA policy → Fleet computes non-compliant | Fleet host CA status compliant=0 |
| Fleet → local proxy → Intune compliance-partner sync | proxy: POST /device (200) "compliance status successfully sent to entra tenant" |
| 'reed' Entra device flips to NON-COMPLIANT | live Graph query: isCompliant: **False** (was True) ✅ |
| Host passes → Fleet reports compliant | Fleet compliant=1; proxy POST /device (200) compliant, message_id returned |
This is the exact block mechanism: a non-compliant device fails any Entra Conditional Access policy requiring device compliance → the user is blocked from Entra-protected resources. Verified with the real dev tenant, not mocks.
@kellykroening This shipped in 4.90 and is ready for preston to test out. Up to you to close.
Brought up to customer-preston. Closing this!
Policies guide the cloud gates admins shape who enters where safer work unfolds