Skip to content

Commit 6d85886

Browse files
committed
Filter MFADevices to exclude password auth methods
Updated the Push-BECRun function to filter out entries in MFADevices where '@odata.type' equals '#microsoft.graph.passwordAuthenticationMethod'. This ensures only relevant MFA devices are included in the output.
1 parent c5eeab1 commit 6d85886

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/CIPPCore/Public/Entrypoints/Activity Triggers/BEC/Push-BECRun.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ function Push-BECRun {
157157
NewRules = @($RulesLog)
158158
MailboxPermissionChanges = @($PermissionsLog)
159159
NewUsers = @($NewUsers)
160-
MFADevices = @($MFADevices)
160+
MFADevices = @($MFADevices | Where-Object { $_.'@odata.type' -ne '#microsoft.graph.passwordAuthenticationMethod' })
161161
ChangedPasswords = @($PasswordChanges)
162162
ExtractedAt = (Get-Date)
163163
ExtractResult = $ExtractResult

0 commit comments

Comments
 (0)