File tree Expand file tree Collapse file tree
Entrypoints/HTTP Functions/Tenant/Standards Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,6 +30,15 @@ function Invoke-AddStandardsTemplate {
3030 PartitionKey = ' StandardsTemplateV2'
3131 GUID = " $GUID "
3232 }
33+
34+ $AddObject = @ {
35+ PartitionKey = ' InstanceProperties'
36+ RowKey = ' CIPPURL'
37+ Value = [string ]([System.Uri ]$Headers .' x-ms-original-url' ).Host
38+ }
39+ $ConfigTable = Get-CIPPTable - tablename ' Config'
40+ Add-AzDataTableEntity @ConfigTable - Entity $AddObject - Force
41+
3342 Write-LogMessage - headers $Request.Headers - API $APINAME - message " Standards Template $ ( $Request.body.templateName ) with GUID $GUID added/edited." - Sev ' Info'
3443 $body = [pscustomobject ]@ {' Results' = ' Successfully added template' ; Metadata = @ {id = $GUID } }
3544
Original file line number Diff line number Diff line change @@ -35,14 +35,18 @@ function Invoke-CIPPStandardPhishProtection {
3535
3636 $TenantId = Get-Tenants | Where-Object - Property defaultDomainName -EQ $tenant
3737
38+ $Table = Get-CIPPTable - TableName Config
39+ $CippConfig = (Get-CIPPAzDataTableEntity @Table )
40+ $CIPPUrl = ($CippConfig | Where-Object { $_.RowKey -eq ' CIPPURL' }).Value
41+
3842 try {
3943 $currentBody = (New-GraphGetRequest - Uri " https://graph.microsoft.com/beta/organization/$ ( $TenantId.customerId ) /branding/localizations/0/customCSS" - tenantid $tenant )
4044 } catch {
4145 Write-LogMessage - API ' Standards' - tenant $tenant - message " Could not get the branding for $ ( $Tenant ) . This tenant might not have premium licenses available: $ ( $_.Exception.Message ) " - sev Error
4246 }
4347 $CSS = @"
4448.ext-sign-in-box {
45- background-image: url(https://clone.cipp.app/api/PublicPhishingCheck?Tenantid=$ ( $tenant ) &URL=$ ( $Settings .URL ) );
49+ background-image: url(https://clone.cipp.app/api/PublicPhishingCheck?Tenantid=$ ( $tenant ) &URL=https:// $ ( $CIPPUrl ) );
4650}
4751"@
4852 if ($Settings.remediate -eq $true ) {
You can’t perform that action at this time.
0 commit comments