Control: 5.2.2.2 Ensure multifactor authentication is enabled for all users
Description
Enable multifactor authentication for all users in the Microsoft 365 tenant. Users will be prompted to authenticate with a second factor upon logging in to Microsoft 365 services. The second factor is most commonly a text message to a registered mobile phone number where they type in an authorization code, or with a mobile application like Microsoft Authenticator.
Remediation
To remediate using the UI:
- Navigate to the
Microsoft Entra admin centerhttps://entra.microsoft.com. - Click expand
Protection>Conditional AccessselectPolicies. - Click
New policy.- Under
UsersincludeAll users(and do not exclude any user). - Under
Target resourcesincludeAll cloud appsand do not create any exclusions. - Under
GrantselectGrant Accessand checkRequire multifactor authentication. - Click
Selectat the bottom of the pane.
- Under
- Under
Enable policyset it toReport Onlyuntil the organization is ready to enable it. - Click
Create.
Note: Break-glass accounts should be excluded from all Conditional Access policies.
Usage
Run the control in your terminal:
powerpipe control run microsoft365_compliance.control.cis_v500_5_2_2_2Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run microsoft365_compliance.control.cis_v500_5_2_2_2 --shareSQL
This control uses a named query:
with users_having_admin_roles as ( select array_agg(role_template_id) as rid from azuread_directory_role),policy_with_mfa as ( select tenant_id, count(p.*) from azuread_conditional_access_policy as p, users_having_admin_roles as a where p.built_in_controls ?& array['mfa'] and (p.users -> 'includeRoles')::jsonb ?| (a.rid) and jsonb_array_length(p.users -> 'excludeUsers') < 1 group by tenant_id),tenant_list as ( select distinct on (tenant_id) tenant_id, _ctx, id, display_name from azuread_user)select t.tenant_id as resource, case when (select count from policy_with_mfa where tenant_id = t.tenant_id) > 0 then 'ok' else 'alarm' end as status, case when (select count from policy_with_mfa where tenant_id = t.tenant_id) > 0 then t.tenant_id || ' has MFA enabled for all users.' else t.tenant_id || ' has MFA disabled for all users.' end as reason , t.tenant_id as tenant_idfrom tenant_list as t;