How to manage FileVault personal recovery keys with Intune on previously encrypted MacOS devices
Published May 02 2024 11:08 PM 3,646 Views
Microsoft

With the rapidly evolving digital landscape, organizations are increasingly turning to Microsoft Intune as their preferred MDM (Mobile Device Management) provider and working on migrating devices from existing MDM solutions to Microsoft Intune.

Migrating device management from one MDM Provider to Microsoft Intune requires several configurations - more details can be found in this article. In this blog, we are going to take a closer look at MacOS device migration from JAMF to Intune, with focus on FileVault key escrow feature.

Migrating MacOS devices from JAMF to Intune involves several steps to ensure smooth transition of the device to Intune and minimizing the impact of productivity. During this process, one of the biggest challenges is getting FileVault recovery keys escrowed back to Intune. We will be focusing on steps which we took to escrow the personal FileVault recovery key to Intune. The specifics of your migration may vary depending on your organization's requirements and the complexity of your existing setup. It is recommended to thoroughly plan and test each step to minimize disruption during the migration process.

There are two main scenarios in which the FileVault key storage process can be categorized:

  1. Device was not FileVault enabled before Intune enrollment (FileVault enabled via Intune policy after enrollment)
    1. Devices marked as “Personal”: Recovery key can only be seen by the user via the Company Portal Website
    2. Devices marked as “Corporate”: Recovery key can be seen by IT (information technology) administrators in addition to owner of the device
  2. Device was FileVault enabled before Intune enrollment:
    1. In this case, the FileVault recovery key is not managed, and Intune is unable to escrow. It is most likely that the recovery key was stored in iCloud.

From this point on, we will be focusing on the 2nd scenario.

The following error message will be shown for the FileVault setting in Intune policy reporting, if FileVault was enabled before Intune enrollment. Intune requires FileVault ownership to apply the “Enable FileVault” setting successfully:

 

naveenak_2-1714708793124.png

 

 

There are multiple ways in which FileVault management can be assumed by Intune. In our implementation, we chose options 2 and 3 from below because they do not require decryption and re-encryption of the drives. Re-encryption adds additional complexity as it will expose user data during this process and consume more time to complete migration. Also, regardless of the option, the steps outlined must be executed by the user who initially enabled FileVault:

  1. From MacOS GUI (graphical user interfaces): From GUI, there is no option to just refresh the recovery key, so it is required to decrypt the device and re-encrypt the device.
    1. On the device, choose Apple menu > System Settings, click Privacy & Security in the sidebar, then click FileVault on the right. (You may need to scroll down.)
    2. Turn off FileVault and turn it back on
    3. Device sync
  2. Terminal commands to refresh the recovery key
    1. Users need to launch the Terminal app on the device.
    2. Run “sudo fdesetup changerecovery -personal
    3. You will be prompted to enter device admin credentials.
  3. IT Admin generated script/app: Sample scripts can be found at below locations, and these scripts can be customized and deployed as an app.

 https://github.com/jamf/FileVault2_Scripts/blob/master/reissueKey.sh

or

 shell-intune-samples/macOS/Config/FileVault/migrateFileVault.zsh at master · microsoft/shell-intune-...

  1. Deploy FileVault key refresh script as Application from JAMF
  2. Unenroll the device from JAMF 
  3. Enroll device to Intune 
  4. Deploy FileVault policy from Intune   
  5. Run the key refresh script (which deployed previously) from application applet

 

Once the user executes the application, the device generates a new personal recovery key, Intune assumes management of FileVault encryption on next Intune check-in, and users can see the recovery key in the Company Portal website.

 

Hopefully, this helps you understand the various methods to escrow FileVault recovery key to Intune.

Co-Authors
Version history
Last update:
‎May 02 2024 10:17 PM
Updated by: