You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Modules/CIPPCore/Public/Alerts/Get-CIPPAlertGroupMembershipChange.ps1
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ function Get-CIPPAlertGroupMembershipChange {
19
19
$AuditLogs=New-GraphGetRequest-uri "https://graph.microsoft.com/v1.0/auditLogs/directoryAudits?`$filter=activityDateTime ge $OneHourAgo and (activityDisplayName eq 'Add member to group' or activityDisplayName eq 'Remove member from group')"-tenantid $TenantFilter
Message="Admin user $($user.DisplayName) ($($user.UPN)) does not have MFA registered."
59
+
UserPrincipalName=$user.UPN
60
+
DisplayName=$user.DisplayName
61
+
Id=$user.ID
62
+
Tenant=$TenantFilter
63
+
})
30
64
}
31
65
32
-
if ($Users.UserPrincipalName) {
33
-
$AlertData=foreach ($userin$Users) {
34
-
[PSCustomObject]@{
35
-
Message="Admin user $($user.userDisplayName) ($($user.userPrincipalName)) does not have MFA registered."
36
-
UserPrincipalName=$user.userPrincipalName
37
-
DisplayName=$user.userDisplayName
38
-
Id=$user.id
39
-
LastUpdated=$user.lastUpdatedDateTime
66
+
foreach ($userin$UnenforcedAdmins) {
67
+
$AlertData.Add([PSCustomObject]@{
68
+
Message="Admin user $($user.DisplayName) ($($user.UPN)) has MFA registered but no enforcement method (Per-User MFA, Security Defaults, or Conditional Access) is active."
Write-LogMessage-message 'Potentially using Duo for MFA, could not check MFA status for Admins with 100% accuracy'-API 'MFA Alerts - Informational'-tenant $TenantFilter-sev Info
0 commit comments