fleet/docs
Jordan Montgomery 149cd9daca
Tweak MDM detection query to return the proper enrollment when there are multiple entries (#29360)
This change is deceptively simple but helps us choose the right one in
cases like #29042 where there are multiple enrollments in the registry.
In this case the customer seems to have been using something like
co-management(though even using their MDM we have not repro'd
internally) which leads to 2 registry keys in the registry with a UPN
node. I believe the way some MDM services handle unenroll can also leave
the registry keys in this state. Either way, because of this, and the
fact that we have a LIMIT 1 in the query, we were, in 50% of the cases
where we had multiple keys, returning the less useful of the nodes from
the query and because no Server URL was coming back we were treating it
as if the host was not MDM enrolled and thus, not unenrolling it, and
leading to enrollment failing.

With this change we'll return the proper registry key which should allow
us to, in the case of migration, properly unenroll the host and even in
the case where a customer isn't using Fleet MDM will allow us to display
the correct information from the registry.

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.
- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Manual QA for all new/changed functionality
2025-05-22 14:08:05 -04:00
..
01-Using-Fleet/standard-query-library Apple Intelligence enabled? (#27866) 2025-04-07 18:40:37 -05:00
Configuration Organize contributor docs and establish ADR process and template (#29101) 2025-05-17 15:03:52 -05:00
Contributing Tweak MDM detection query to return the proper enrollment when there are multiple entries (#29360) 2025-05-22 14:08:05 -04:00
Deploy Docs: Fix urls of two images on SSO page (#28990) 2025-05-08 17:30:28 -05:00
files Handbook: Adding 2024 pen test document to security audit page (#21393) 2024-08-21 11:15:37 -04:00
Get started Bumping MySQL 8.4.3->8.4.5 and 9.1.0->9.3.0 in tests. (#28767) 2025-05-02 13:40:11 -05:00
images Update single-sign-on-sso.md (#27784) 2025-04-04 18:04:18 -05:00
REST API API docs: Clarify software install statuses (#29203) 2025-05-21 10:21:54 -05:00
Using Fleet Docs quick reference optimization (#21331) 2024-08-16 15:30:31 -05:00
queries.yml Docs: Update macOS software host vital query (#29139) 2025-05-15 18:26:35 -05:00
README.md Updated broken links for Using Fleet and Deploying (#20655) 2024-07-25 10:04:18 -04:00

Fleet documentation

Welcome to the documentation for Fleet, the lightweight management platform for laptops and servers.

You can also read the Fleet docs over at https://fleetdm.com/docs.

Using Fleet

Resources for using the Fleet UI, fleetctl CLI, and Fleet REST API.

Deploying

Resources for installing Fleet's infrastructure dependencies, configuring Fleet, deploying osquery to hosts, and viewing example deployment scenarios.

Contributing

If you're interested in interacting with the Fleet source code, you'll find information on modifying and building the code here.


If you have any questions, please don't hesitate to File a GitHub issue or join us on Slack. You can find us in the #fleet channel.