Setup experience: scope software via labels on macOS, Windows and Linux
Goal
| User story |
|---|
| As an IT admin, |
| I want to install software (Fleet-maintained apps, App Store apps, or custom packages) during new host setup only on hosts that are a member of the specific label |
| so that I can scope software install more granularly (e.g. by department, role, software architecture, etc. OR to scope a stable version to new hosts. |
Changes
Software's labels (scope) should be respected in setup experience for all supported platforms.
When a host enrolls, enqueueSetupExperienceItems selects every item flagged install_during_setup for the host's team and platform with no label filtering, so out-of-scope software is installed on and shown to the enrolling host. This story adds per-host label-scope filtering at enrollment, reusing the scope logic that already gates the normal install paths. Multi-platform setup experience, multiple packages per title, and the tabbed Install software UI already shipped, so label scope is the remaining gap.
More details in Figma
Product
- [x] UI changes: Figma. The tabbed Install software UI already shipped; the dev notes (remove help text, Versions tooltip copy, first-added tooltip) appear delivered by #49079 and are verified in QA (#49407).
- [x] CLI (fleetctl) usage changes: No changes
- [x] YAML changes: Re-apply the
setup_experiencenote reverted by #27119, updated for all platforms + label scope. Tracked in #49407. - [x] REST API changes: No changes. Setup experience selection is team-level and host-independent; scope filtering happens at enrollment.
- [x] Fleet's agent (fleetd) changes: No changes
- [x] Fleet server configuration changes: No changes
- [x] Exposed, public API endpoint changes: No changes
- [x] fleetdm.com changes: No changes
- [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: No changes. Custom packages and VPP are already Fleet Premium.
- [x] My device and fleetdm.com/better changes: No changes
- [x] Usage statistics: No changes
- [x] Other reference documentation changes:
articles/macos-setup-experience.md. Tracked in #49407. - [x] First draft of test plan added
Engineering
- [x] Test plan is finalized
- [x] Contributor API changes: No changes.
- [x] Feature guide changes:
articles/macos-setup-experience.md— note that setup experience respects label scope. Tracked in #49407. - [x] Database schema migrations: No changes.
software_installer_labels,vpp_app_team_labels, andlabel_membershipalready exist. - [x] Load testing: Not required. The enqueue query gains an
EXISTSscope predicate per software union part, run once per host at enrollment; same order as the existing per-item scope checks on the normal install path. - [x] Pre-QA load test: Not required.
- [x] Load testing/osquery-perf improvements: None.
- [x] This is a premium only feature: Yes. Scope tables and setup experience are already premium-gated; no new tier gating.
Risk assessment
- Requires testing in a hosted environment: No. Local dev with hosts on each platform is sufficient.
- Requires load testing: No.
- Risk level: Low
- Regression watch: no-label software must still install on every host; exclude-any must honor the
label_updated_atvs labelcreated_attiming for dynamic labels; the first-added dedup must select the first-added in-scope package per title.
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.
Core flow
- [ ] Mark software for setup experience with an include-any label. Enroll an in-scope host and an out-of-scope host. Confirm only the in-scope host installs it and shows it in setup progress.
- [ ] Repeat with an exclude-any label.
- [ ] Repeat with an include-all label.
- [ ] Confirm software with no labels still installs on every host.
Platforms
- [ ] macOS (Apple MDM / DEP).
- [ ] Windows and Linux (Orbit enrollment).
- [ ] iOS or iPadOS (VPP app).
GitOps
- [ ] Set
setup_experience: trueon a label-scoped software item, runfleetctl gitops, enroll a host, and confirm scope is respected.
Edge cases
- [ ] Two in-scope packages for one title: only the first-added installs.
- [ ] First-added package out of scope, a later one in scope: the later one installs.
- [ ] Host re-enrollment (failed-step reset) still applies scope and skips already-succeeded items.
Permissions
- [ ] Setup experience configuration is premium; confirm no per-role behavior change.
Testing notes
Android is out of scope: it does not use the setup experience enqueue flow (software is baked into the Android policy at enroll).
Confirmation
- [ ] Engineer: Added comment to user story confirming successful completion of test plan.
- [ ] 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":
@mostlikelee I'm moving this to you. There's an open question on the API, however, which I think is in your corner. LMK if that's not the case/how you'd like to proceed on that question.
Thanks!
calling out here that there may be dependencies here with the new unified MDM queue
Hey @mostlikelee just a reminder that this story is ready to spec. Can you please fill out the TODOs in the "Engineering" section so we can estimate this one?
@jmwatts can you take a 👀 at the QA plan?
@mostlikelee the test plan looks good unless there will be specific things we will be able to do with the API that we were not able to do previously.
- GitOps error cases:
- If
setup_experienceis set totruefor a Windows or Linux package, we see the error spec'd here: https://github.com/fleetdm/fleet/pull/25338/files#r1932537780- If
setup_experienceis set totruefor one or more software items andmacos_setup.softwareis defined, we see the error spec'd here: https://github.com/fleetdm/fleet/pull/25338/files#r1931046283
@mostlikelee @jmwatts heads up that we missed drafting some error messages (see above). I added these to the "Test plan" section.
Question from @RachelElysia:
Are we going to show the labels that are included/excluded?
![]()
@noahtalerman: Yep! We show those labels in a tooltip on hover:
Regarding the underline to know it's a tooltip, great catch. We use italics in this scenario where we show a tooltip with an arrow. I just updated Figma.
I chatted with and we think it makes sense to deprioritize this story.
More context in the video here: https://drive.google.com/file/d/1gP5_0oSnhyNDU68llfxZf7Hfkx6L35ar/view?usp=sharing
Granular control gained, Macs boot, software installed right, Fleet flows like cloud rain.
Whoops, just meant to remove :product. Didn't mean to close the issue.
Goal 2
User story As an IT admin, I want to install custom packages during new host setup only on hosts that are a member of the specific label so that I can install the stable version of a custom package to new hosts while testing a new version on a test group of already enrolled hosts.
FYI @marko-lisica I wrote down a second story for this because we decided to address this story after multiple packages for one software title:
This is ready to be worked on.
Hey @georgekarrv heads up that I assigned you this issue because I saw that subtasks are filed. So, I assume we're ready to move this one "Ready" during the next sprint planning.
(https://fleetdm.com/handbook/company/product-groups#how-issues-move)
cc @cdcme @marko-lisica
@marko-lisica chatted about this one during feature fest...IdP labels and any dynamic labels that require a user to exist won't work, right? If yes, let's make sure we document yet.
@marko-lisica Quick question for you.
When a brand-new host enrolls, it hasn't run any label queries yet. So if software is scoped to a query-based label, we can't tell whether the host matches when setup starts. Manual labels and host vitals labels (IdP group, department) aren't affected, we already know those.
Two ways we could handle it:
- Skip the software during setup. It installs right after through the normal path once the host reports labels. Simple, same behavior on every platform.
- Hold setup until the host reports labels. Gets things like arch-specific packages into setup, but only on macOS, Windows, and Linux.
If we skip, do we want a short hint in the UI that query-based labels kick in after the host reports (the Figma removes the current "labels don't apply" footer), or is covering it in the guide enough?
Can we support these: https://github.com/fleetdm/fleet/issues/39088?
@marko-lisica @cdcme are all platforms covered by this story? We're about to build scoping Android software with labels.
@marko-lisica @cdcme are all platforms covered by this story? We're about to build scoping Android software with labels.
@cdcme What do you think how should we do this. Should we split this into 2 stories: one for desktop (platforms running fleetd) and on for mobile?
@marko-lisica yeah, I'd lean toward keeping them distinct.
@Leanngove @cdcme I just renamed this issue. It should cover desktop platforms: macOS, Windows, and Linux.
I'll file new stories for iOS and Android.