Choose default fleet for iOS/iPadOS hosts that enroll via Account-driven User Enrollment (BYOD)
Goal
| User story |
|---|
| As an IT admin, |
| I want to automatically add iOS/iPadOS hosts that enroll via Account-driven User Enrollment (BYOD) to a fleet |
| so that I can make sure iPhones/iPads automatically get the right configuration profiles and software. |
Changes
Product
- [x] UI changes: Figma
- [x] CLI (fleetctl) usage changes: No changes
- [x] YAML changes: https://github.com/fleetdm/fleet/pull/48171
- [x] REST API changes: https://github.com/fleetdm/fleet/pull/45379
- [x] Fleet's agent (fleetd) changes: No changes
- [x] Fleet server configuration changes: No changes
- [x] Exposed, public API endpoint changes: https://github.com/fleetdm/fleet/pull/45618
- [x] fleetdm.com changes: No changes
- [x] GitOps Mode UI changes: The
byod_fleetfield should appear as read-only in the ABM settings UI when GitOps mode is enabled (same as existing) - [x] GitOps generation changes:
fleetctl generate-gitopsoutput must include thebyod_fleetfield - [x] Activity changes: No changes
- [x] Permissions changes: No changes
- [x] Changes to paid features or tiers: No changes
- [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
- [ ] Once shipped, requester has been notified
- [x] Once shipped, dogfooding issue has been filed
Engineering
- [x] Test plan is finalized
- [x] Contributor API changes: https://github.com/fleetdm/fleet/pull/45618
- [x] Feature guide changes: https://github.com/fleetdm/fleet/pull/45375
- [x] Database schema migrations: See subtasks
ℹ️ Please read this issue carefully and understand it. Pay special attention to UI wireframes, especially "dev notes".
QA
Risk assessment
- Risk level: Low
Test plan
Make sure to go through the list and consider all events that might be related to this story, so we catch edge cases earlier.
Note: Make sure to set the default iOS/iPadOS MDM server to your server while testing. Unset it when done! and drop a note in #help-dogfooding when you're doing it so people know what to expect
Core flow
- [x] Set a default fleet for BYOD iOS/iPadOS enrollment via the AB settings UI. Verify hosts enrolling via account-based user enrollment land in that fleet
- [x] Ensure VPP apps and profiles can be pushed to hosts after enrollment
- [x] Change the
byod_fleetto a different fleet. Verify newly enrolling BYOD hosts go to the updated fleet - [x] Clear/unset
byod_fleet. Verify BYOD-enrolled hosts fall back to expected default behavior (e.g., unassigned) - [x] Verify existing AB fields (
macos_fleet,ios_fleet,ipados_fleet) are unaffected by the newbyod_fleetfield - [x] With multiple AB tokens configured, verify
byod_fleetcan be set independently per AB token
UI
- [x] Verify that all UI changes specified in the Figma wireframes are correctly implemented
- [x] Verify expected UI states (loading, empty, error states if applicable)
- [x] Verify long fleet names render correctly in the
byod_fleetdropdown (responsiveness consideration) - [x] Verify the field appears correctly in GitOps mode (read-only with tooltip)
- [x] Verify behavior when the fleet assigned to
byod_fleetis deleted
Host lifecycle
- [x] Transfer a BYOD-enrolled host to another fleet manually. Verify it works and doesn't conflict with the default
- [x] Delete a host that was auto-assigned via
byod_fleetand verify clean removal - [x] Re-enroll a previously deleted BYOD host. Verify it lands in the currently configured
byod_fleet
API
- [x] Verify that AB token endpoints return
byod_teamandbyod_fleetand that eitherbyod_teamorbyod_fleetcan be used
GitOps (generate + run)
- [ ] Configure
byod_fleetthrough the UI and runfleetctl generate-gitops - [ ] Confirm the generated
.ymlincludes thebyod_fleetfield under the ABM config - [x] Modify the
byod_fleetvalue in.ymland runfleetctl gitopsand confirm it updates correctly - [x] Remove the
byod_fleetkey from.ymland runfleetctl gitopsand confirm it unsets or uses default - [x] Enable GitOps mode and verify the
byod_fleetsetting is read-only in the UI
Permissions
- [x] Global Admin: can set/change/clear
byod_fleet - [x] Global Maintainer: verify expected access (likely read-only or no access to ABM settings)
- [x] Global Observer / Observer+: cannot modify
byod_fleet - [x] Fleet-level Admin/Maintainer/Observer: verify appropriate restrictions
- [x] GitOps user: can set
byod_fleetviafleetctl gitops - [x] API-only user: can call the endpoint with appropriate role
Supplemental testing
Testing notes
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": TO DO
Related: https://github.com/fleetdm/fleet/issues/31748
@JordanMontgomery Is this still 4.87 or actually 4.88?
@MagnusHJensen I think this got pushed out of 4.87 but still a good candidate if we can pull it in.
Validated
- Set a BYOD default fleet in the Apple Business settings -> BYOD iPhone/iPad enrollments land in correct fleet.
- Config profiles and apps scoped to the fleet reach the device after enrollment.
- Change the BYOD fleet -> newly enrolling devices go to the new fleet (already-enrolled devices stay put).
- Clear the BYOD fleet -> new BYOD devices fall back to No team.
- The existing macOS/iOS/iPadOS fleet settings are unaffected by the new BYOD setting.
- Unable to directly test multiple AB tokens, but verified by Claude.
UI
- The BYOD fleet dropdown appears in the Edit fleets modal as designed, alongside macOS/iOS/iPadOS.
- Long fleet names render cleanly in the dropdown (no cut-off or layout break).
- In GitOps mode the setting is read-only (Edit fleets is disabled with the GitOps tooltip).
- Deleting the fleet that's set as the BYOD fleet resets the setting to No team.
- ☑Loading/empty/error states - spot-checked only (standard behavior; low risk).
Host lifecycle
- Manually moving a BYOD device to another fleet works and doesn't fight the default setting.
- Deleting a BYOD device removes it cleanly.
- Re-enrolling a device lands it in the currently configured BYOD fleet. (Note: re-enrolling a BYOD device shows up as a new host record - expected for personal/Apple account-driven enrollment.)
API
- The AB token endpoints return both
byod_teamandbyod_fleet, and either name can be used to set the value.
GitOps
- The BYOD fleet value is accepted in the GitOps config and reads back correctly; a GitOps user is allowed to set it; GitOps mode makes it read-only in the UI (as above).
- Note: Acceptance criteria states that
fleetctl generate-gitopsshould include the BYOD fleet in the.yml. Fleet assignment can be set through the UI, howeverfleetctl generate-gitopsdoesn't include the BYOD fleet in the exported file. This is pre-existing and affects all the AB fleet fields, not just BYOD. Not considering a blocker, but need input from product team to determine if this is a bug or feature request.
Permissions
- Global Admin can set/change/clear the BYOD fleet.
- Global Maintainer, Observer, and Observer+ cannot (no access to AB token settings).
- Fleet-level Admin/Maintainer/Observer cannot (global-only settings).
- GitOps user can set it via GitOps.
Free
- On Fleet Free, the Apple Business page shows the "included in Fleet Premium" upgrade message and the API cleanly reports Premium is required - no errors.
Found during testing: https://github.com/fleetdm/fleet/issues/48653
This is an existing issue and does not block release.
@andreasn-work @pintomi1989 Assigning this to you to notify your customer this was shipped. Feel free to close this issue after you've done that!
Notified the customer, closing now
Fleet now guides iPhones, Configuration ease, like sun, Rising, day's begun.