Skip to content

Commit

Permalink
final touches prerelease
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Jun 14, 2024
1 parent d5f7c5e commit 285e24c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Modules/CIPPCore/Public/Set-CIPPPerUserMFA.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function Set-CIPPPerUserMFA {
try {
$int = 0
$Body = @{
PerUserState = $State
perUserMFAstate = $State
}
$Requests = foreach ($id in $userId) {
@{
Expand All @@ -48,6 +48,7 @@ function Set-CIPPPerUserMFA {
}
}


$Requests = New-GraphBulkRequest -tenantid $tenantfilter -scope 'https://graph.microsoft.com/.default' -Requests @($Requests) -asapp $true
"Successfully set Per user MFA State for $userId"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function Invoke-CIPPStandardPerUserMFA {
If ($Settings.remediate -eq $true) {
if ($UsersWithoutMFA) {
try {
$MFAMessage = Set-CIPPPeruserMFA -TenantFilter $Tenant -UserId $UsersWithoutMFA.UserPrincipalName -State 'Enforced'
$MFAMessage = Set-CIPPPeruserMFA -TenantFilter $Tenant -UserId $UsersWithoutMFA.UserPrincipalName -State 'enforced'
Write-LogMessage -API 'Standards' -tenant $tenant -message $MFAMessage -sev Info
} catch {
$ErrorMessage = Get-NormalizedError -Message $_.Exception.Message
Expand Down

0 comments on commit 285e24c

Please sign in to comment.