Skip to content

Commit

Permalink
Merge pull request KelvinTegelaar#587 from DirkHaex/patch-9
Browse files Browse the repository at this point in the history
Update Invoke-CIPPStandardPhishProtection.ps1
  • Loading branch information
KelvinTegelaar authored Jan 19, 2024
2 parents 465ecd2 + 312f6fc commit 3105663
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ function Invoke-CIPPStandardPhishProtection {
New-GraphPostRequest -tenantid $tenant -Uri "https://graph.microsoft.com/beta/organization/$($TenantId.customerId)/branding/localizations/" -ContentType 'application/json' -asApp $true -Type POST -Body $defaultBrandingBody -AddedHeaders $AddedHeaders
}
if ($currentBody -like "*$CSS*") {
Write-Host 'Logon Screen Phising Protection system already active'
Write-Host 'Logon Screen Phishing Protection system already active'
Write-LogMessage -API 'Standards' -tenant $tenant -message 'Logon Screen Phishing Protection system already active' -sev Info
} else {
$currentBody = $currentBody + $CSS
Write-Host 'Creating Logon Screen Phising Protection System'
Write-Host 'Creating Logon Screen Phishing Protection System'
New-GraphPostRequest -tenantid $tenant -Uri "https://graph.microsoft.com/beta/organization/$($TenantId.customerId)/branding/localizations/0/customCSS" -ContentType 'text/css' -asApp $true -Type PUT -Body $CSS
Write-LogMessage -API 'Standards' -tenant $tenant -message 'Enabled Logon Screen Phishing Protection system' -sev Info
}
Expand All @@ -49,4 +49,4 @@ function Invoke-CIPPStandardPhishProtection {
if ($currentBody -like "*$CSS*") { $authstate = $true } else { $authstate = $false }
Add-CIPPBPAField -FieldName 'PhishProtection' -FieldValue [bool]$authstate -StoreAs bool -Tenant $tenant
}
}
}

0 comments on commit 3105663

Please sign in to comment.