Skip to content

Commit

Permalink
try pushing default branding
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Jan 24, 2024
1 parent c029ad7 commit 9c0ffc2
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ function Invoke-CIPPStandardPhishProtection {

try {
if (!$currentBody) {
$AddedHeaders = @{'Accept-Language' = 0}
$AddedHeaders = @{'Accept-Language' = 0 }
$defaultBrandingBody = '{"usernameHintText":null,"signInPageText":null,"backgroundColor":null,"customPrivacyAndCookiesText":null,"customCannotAccessYourAccountText":null,"customForgotMyPasswordText":null,"customTermsOfUseText":null,"loginPageLayoutConfiguration":{"layoutTemplateType":"default","isFooterShown":true,"isHeaderShown":false},"loginPageTextVisibilitySettings":{"hideAccountResetCredentials":false,"hideTermsOfUse":true,"hidePrivacyAndCookies":true},"contentCustomization":{"conditionalAccess":[],"attributeCollection":[]}}'
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
try {
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
} catch {

}
}
if ($currentBody -like "*$CSS*") {
Write-Host 'Logon Screen Phising Protection system already active'
Expand Down

0 comments on commit 9c0ffc2

Please sign in to comment.