Skip to content

Commit

Permalink
Allow EnrollmentState to be in status '3' for MDM clients (#17868)
Browse files Browse the repository at this point in the history
#17692

Recently there was a change that filtered out hosts in `EnrollmentState`
3. This change may cause some hosts that are in otherwise good health to
appear unresponsive to MDM in the management UI.

This change will allow hosts with `EnrollmentStatus` 3 show as enrolled.

The root cause of some hosts being in state 3 is still not entirely
clear, but may have to do with either trying to re-enroll once already
enrolled, or windows updates causing some sort of issue with fleet.

Despite the "failed" `EnrollmentState` 3, the host will still display
that the system is managed by Fleet, and will actively sync.
  • Loading branch information
dantecatalfamo authored and georgekarrv committed Mar 26, 2024
1 parent fd71574 commit 26d320e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changes/17692-enrollment-state-3.md
@@ -0,0 +1 @@
- Fix a bug where valid MDM enrollments would show up as unmanaged (EnrollmentState 3)
2 changes: 1 addition & 1 deletion server/service/osquery_utils/queries.go
Expand Up @@ -496,7 +496,7 @@ var extraDetailQueries = map[string]DetailQuery{
-- coalesce to 'unknown' and keep that state in the list
-- in order to account for hosts that might not have this
-- key, and servers
WHERE COALESCE(e.state, '0') IN ('0', '1', '2')
WHERE COALESCE(e.state, '0') IN ('0', '1', '2', '3')
LIMIT 1;
`,
DirectIngestFunc: directIngestMDMWindows,
Expand Down

0 comments on commit 26d320e

Please sign in to comment.