Skip to content

Commit bda4295

Browse files
authored
Create users_with_cloud_access_and_mfa.yaml
1 parent bd4e159 commit bda4295

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
id: users_with_cloud_access_and_mfa
2+
type: query
3+
title: MFA Status of Azure Users
4+
description: This query checks the MFA status of all users with access to Azure. Use this to identify users who need to enable MFA.
5+
integration_type:
6+
- entraid_directory
7+
- azure_subscription
8+
query: |
9+
SELECT u.user_principal_name AS "UserPrincipalName",
10+
u.display_name AS "UserDisplayName",
11+
r.is_mfa_capable AS "MFA Capable",
12+
r.is_mfa_registered AS "IsMfaRegistered",
13+
r.is_system_preferred_authentication_method_enabled AS "IsSystemPreferredAuthenticationMethodEnabled",
14+
COUNT(DISTINCT a.subscription_id) AS "Number of Subscriptions"
15+
FROM entraid_user u
16+
JOIN entraid_user_registration_details r
17+
ON u.id = r.id
18+
JOIN azure_role_assignment a
19+
ON u.id = a.principal_id
20+
WHERE a.subscription_id IS NOT NULL
21+
GROUP BY u.user_principal_name,
22+
u.display_name,
23+
r.is_mfa_capable,
24+
r.is_mfa_registered,
25+
r.is_system_preferred_authentication_method_enabled
26+
ORDER BY COUNT(DISTINCT a.subscription_id) DESC;
27+
28+
29+
tags:
30+
cloud_access:
31+
- 'true'
32+
cloud_ops:
33+
- 'true'
34+
cloud_provider:
35+
- azure
36+
cloud_service:
37+
- Cognitive Services
38+
platform_queries_bookmark:
39+
- 'true'

0 commit comments

Comments
 (0)