Skip to content

Commit 01aa9b5

Browse files
committed
fix: offboarding job conditions
1 parent 547599b commit 01aa9b5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Identity/Administration/Users/Invoke-CIPPOffboardingJob.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ function Invoke-CIPPOffboardingJob {
155155
}
156156
}
157157
@{
158-
Condition = { ![string]::IsNullOrEmpty($Options.OnedriveAccess) }
158+
Condition = { $Options.OnedriveAccess.Count -gt 0 }
159159
Cmdlet = 'Set-CIPPSharePointPerms'
160160
Parameters = @{
161161
tenantFilter = $TenantFilter
@@ -166,7 +166,7 @@ function Invoke-CIPPOffboardingJob {
166166
}
167167
}
168168
@{
169-
Condition = { ![string]::IsNullOrEmpty($Options.AccessNoAutomap) }
169+
Condition = { $Options.AccessNoAutomap.Count -gt 0 }
170170
Cmdlet = 'Set-CIPPMailboxAccess'
171171
Parameters = @{
172172
tenantFilter = $TenantFilter
@@ -179,7 +179,7 @@ function Invoke-CIPPOffboardingJob {
179179
}
180180
}
181181
@{
182-
Condition = { ![string]::IsNullOrEmpty($Options.AccessAutomap) }
182+
Condition = { $Options.AccessAutomap.Count -gt 0 }
183183
Cmdlet = 'Set-CIPPMailboxAccess'
184184
Parameters = @{
185185
tenantFilter = $TenantFilter

0 commit comments

Comments
 (0)