turbot/steampipe-mod-microsoft365-compliance

Control: 5.1.4.6 Ensure users are restricted from recovering BitLocker keys

Description

This setting determines if users can self-service recover their BitLocker key(s). 'Yes' restricts non-admin users from being able to see the BitLocker key(s) for their owned devices if there are any. 'No' allows all users to recover their BitLocker key(s).

The recommended state is Yes.

Remediation

To remediate using the UI:

  1. Navigate to Microsoft Entra admin center https://entra.microsoft.com/.
  2. Click to expand Entra ID > Devices select Device settings.
  3. Set Restrict users from recovering the BitLocker key(s) for their owned devices to Yes.

To remediate using PowerShell:

  1. Connect to Microsoft Graph using Connect-MgGraph -Scopes "Policy.ReadWrite.Authorization".
  2. Run the following:
$params = @{
defaultUserRolePermissions = @{
AllowedToReadBitlockerKeysForOwnedDevice = $false
}
}
Update-MgPolicyAuthorizationPolicy -BodyParameter $params

Default Value

No.

Usage

Run the control in your terminal:

powerpipe control run microsoft365_compliance.control.cis_v600_5_1_4_6

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run microsoft365_compliance.control.cis_v600_5_1_4_6 --share

SQL

This control uses a named query:

select
tenant_id || '/' || id as resource,
case
when (default_user_role_permissions -> 'allowedToReadBitlockerKeysForOwnedDevice') is null then 'alarm'
when not (default_user_role_permissions -> 'allowedToReadBitlockerKeysForOwnedDevice')::bool then 'ok'
else 'alarm'
end as status,
case
when (default_user_role_permissions -> 'allowedToReadBitlockerKeysForOwnedDevice') is null then tenant_id || ' has BitLocker key recovery setting not configured.'
when not (default_user_role_permissions -> 'allowedToReadBitlockerKeysForOwnedDevice')::bool then tenant_id || ' has users restricted from recovering BitLocker keys.'
else tenant_id || ' has users allowed to recover BitLocker keys.'
end as reason
, tenant_id as tenant_id
from
azuread_authorization_policy;

Tags