Skip to content

Commit 0971049

Browse files
committed
CA policy tweaks
1 parent 5b3b68c commit 0971049

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Conditional/Invoke-ListConditionalAccessPolicies.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ Function Invoke-ListConditionalAccessPolicies {
174174
displayName = $cap.displayName
175175
customer = $cap.Customer
176176
tenantID = $cap.TenantID
177-
createdDateTime = $(if (![string]::IsNullOrEmpty($cap.createdDateTime)) { [datetime]$cap.createdDateTime | Get-Date -Format 'yyyy-MM-dd HH:mm' }else { '' })
178-
modifiedDateTime = $(if (![string]::IsNullOrEmpty($cap.modifiedDateTime)) { [datetime]$cap.modifiedDateTime | Get-Date -Format 'yyyy-MM-dd HH:mm' }else { '' })
177+
createdDateTime = $(if (![string]::IsNullOrEmpty($cap.createdDateTime)) { [datetime]$cap.createdDateTime } else { '' })
178+
modifiedDateTime = $(if (![string]::IsNullOrEmpty($cap.modifiedDateTime)) { [datetime]$cap.modifiedDateTime }else { '' })
179179
state = $cap.state
180180
clientAppTypes = ($cap.conditions.clientAppTypes) -join ','
181181
includePlatforms = ($cap.conditions.platforms.includePlatforms) -join ','

Modules/CIPPCore/Public/Invoke-RemoveCAPolicy.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Function Invoke-RemoveCAPolicy {
1919
$policyId = $Request.Query.GUID
2020
if (!$policyId) { exit }
2121
try {
22-
$null = New-GraphPostRequest -uri "https://graph.microsoft.com/v1.0/identity/conditionalAccess/policies/$($policyId)" -type DELETE -tenant $TenantFilter
22+
$null = New-GraphPostRequest -uri "https://graph.microsoft.com/v1.0/identity/conditionalAccess/policies/$($policyId)" -type DELETE -tenant $TenantFilter -asapp $true
2323
Write-LogMessage -user $User -API $APINAME -message "Deleted CA Policy $policyId" -Sev 'Info' -tenant $TenantFilter
2424
$body = [pscustomobject]@{'Results' = 'Successfully deleted the policy' }
2525

0 commit comments

Comments
 (0)