File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Conditional Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -34,13 +34,16 @@ function Invoke-ExecCAExclusion {
3434 throw " Policy with ID $PolicyId not found in tenant $TenantFilter ."
3535 }
3636
37- $SecurityGroups = New-GraphGetRequest - uri " https://graph.microsoft.com/beta/identity/ groups?`$ select=id,displayName&`$ filter=securityEnabled eq true and mailEnabled eq false&`$ count=true" - tenantid $TenantFilter
37+ $SecurityGroups = New-GraphGetRequest - uri " https://graph.microsoft.com/beta/groups?`$ select=id,displayName&`$ filter=securityEnabled eq true and mailEnabled eq false&`$ count=true" - tenantid $TenantFilter
3838 $VacationGroup = $SecurityGroups | Where-Object { $_.displayName -contains " CIPP-Vacation-$ ( $Policy.displayName ) " }
3939
4040 if (! $VacationGroup ) {
4141 Write-Information " Creating vacation group: CIPP-Vacation-$ ( $Policy.displayName ) "
42+ $Guid = [guid ]::NewGuid().ToString()
4243 $GroupObject = @ {
44+ groupType = ' generic'
4345 displayName = " CIPP-Vacation-$ ( $Policy.displayName ) "
46+ username = " vacation$Guid "
4447 securityEnabled = $true
4548 }
4649 $NewGroup = New-CIPPGroup - GroupObject $GroupObject - TenantFilter $TenantFilter - APIName ' Invoke-ExecCAExclusion'
You can’t perform that action at this time.
0 commit comments