diff --git a/changes/20310-update-my-device-copy b/changes/20310-update-my-device-copy new file mode 100644 index 0000000000..9a91f6432a --- /dev/null +++ b/changes/20310-update-my-device-copy @@ -0,0 +1 @@ +- update copy on for automica enrollment modal on my device page. diff --git a/changes/20311-migrations b/changes/20311-migrations new file mode 100644 index 0000000000..4cf8dffe0e --- /dev/null +++ b/changes/20311-migrations @@ -0,0 +1,3 @@ +- Adds ability for MDM migrations if the host is manually enrolled to a 3rd party MDM. +- Adds an offline screen to the macOS MDM migration flow. +- Updates the instructions on "My device" for MDM migrations on pre-Sonoma macOS hosts. \ No newline at end of file diff --git a/ee/server/service/devices.go b/ee/server/service/devices.go index 590067e916..7c3b580e92 100644 --- a/ee/server/service/devices.go +++ b/ee/server/service/devices.go @@ -62,7 +62,12 @@ func (svc *Service) TriggerMigrateMDMDevice(ctx context.Context, host *fleet.Hos return ctxerr.Wrap(ctx, err, "fetching host mdm info") } - if !fleet.IsEligibleForDEPMigration(host, mdmInfo, connected) { + manualMigrationEligible, err := fleet.IsEligibleForManualMigration(host, mdmInfo, connected) + if err != nil { + return ctxerr.Wrap(ctx, err, "checking manual migration eligibility") + } + + if !fleet.IsEligibleForDEPMigration(host, mdmInfo, connected) && !manualMigrationEligible { bre.InternalErr = ctxerr.New(ctx, "host not eligible for macOS migration") } @@ -139,9 +144,15 @@ func (svc *Service) GetFleetDesktopSummary(ctx context.Context) (fleet.DesktopSu sum.Notifications.RenewEnrollmentProfile = true } - if fleet.IsEligibleForDEPMigration(host, mdmInfo, connected) { + manualMigrationEligible, err := fleet.IsEligibleForManualMigration(host, mdmInfo, connected) + if err != nil { + return sum, ctxerr.Wrap(ctx, err, "checking manual migration eligibility") + } + + if fleet.IsEligibleForDEPMigration(host, mdmInfo, connected) || manualMigrationEligible { sum.Notifications.NeedsMDMMigration = true } + } // organization information diff --git a/frontend/pages/hosts/details/DeviceUserPage/AutoEnrollMdmModal/AutoEnrollMdmModal.tsx b/frontend/pages/hosts/details/DeviceUserPage/AutoEnrollMdmModal/AutoEnrollMdmModal.tsx index 2f40fa82b6..e4b50bdbdb 100644 --- a/frontend/pages/hosts/details/DeviceUserPage/AutoEnrollMdmModal/AutoEnrollMdmModal.tsx +++ b/frontend/pages/hosts/details/DeviceUserPage/AutoEnrollMdmModal/AutoEnrollMdmModal.tsx @@ -23,6 +23,57 @@ const AutoEnrollMdmModal = ({ .map((s) => parseInt(s, 10)); isMacOsSonomaOrLater = major >= 14; } + + const preSonomaBody = ( + <> +

+ To turn on MDM, Apple Inc. requires you to follow the steps below. +

+
    +
  1. + Open your Mac's notification center by selecting the date and + time in the top right corner of your screen. +
  2. +
  3. + Select the Device Enrollment notification. This will open{" "} + System Settings. Select Allow. +
  4. +
  5. + Enter your password, and select Enroll. +
  6. +
  7. + Select Done to close this window and select Refetch on your My + device page to tell your organization that MDM is on. +
  8. +
+ + ); + + const sonomaAndAboveBody = ( + <> +

+ To turn on MDM, Apple Inc. requires that you install a profile. +

+
    +
  1. + From the Apple menu in the top left corner of your screen, select{" "} + System Settings or System Preferences. +
  2. +
  3. + In the sidebar menu, select Enroll in Remote Management, and + select Enroll. +
  4. +
  5. + Enter your password, and select Enroll. +
  6. +
  7. + Close this window and select Refetch on your My device page to + tell your organization that MDM is on. +
  8. +
+ + ); + return (
-

- To turn on MDM, Apple Inc. requires that you install a profile. -

-
    -
  1. - From the Apple menu in the top left corner of your screen, select{" "} - System Settings or System Preferences. -
  2. -
  3. - {isMacOsSonomaOrLater ? ( - <> - In the sidebar menu, select Enroll in Remote Management, - and select Enroll. - - ) : ( - <> - In the search bar, type “Profiles.” Select Profiles, find - and select Enrollment Profile, and select Install. - - )} -
  4. -
  5. - Enter your password, and select Enroll. -
  6. -
  7. - Close this window and select Refetch on your My device page - to tell your organization that MDM is on. -
  8. -
+ {isMacOsSonomaOrLater ? sonomaAndAboveBody : preSonomaBody}