Skip to content

Commit

Permalink
Merge pull request #1123 from JohnDuprey/dev
Browse files Browse the repository at this point in the history
Fix user mailbox offboarding
  • Loading branch information
JohnDuprey authored Sep 26, 2024
2 parents 5d29d92 + be034c9 commit 3dc6551
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
12 changes: 0 additions & 12 deletions AddAlertSubscription_Queue/function.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Function Invoke-ExecAlertsList {
$Rows = Get-CIPPAzDataTableEntity @Table -filter $Filter | Where-Object -Property Timestamp -GT (Get-Date).AddMinutes(-10)
if (!$Rows) {
$TenantList = Get-Tenants -IncludeErrors
$Queue = New-CippQueueEntry -Name 'Alerts List' -TotalTasks ($TenantList | Measure-Object).Count
$Queue = New-CippQueueEntry -Name 'Alerts List - All Tenants' -TotalTasks ($TenantList | Measure-Object).Count
$InputObject = [PSCustomObject]@{
OrchestratorName = 'AlertsList'
QueueFunction = [PSCustomObject]@{
Expand Down
4 changes: 3 additions & 1 deletion Modules/CIPPCore/Public/Invoke-CIPPOffboardingJob.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,15 @@ function Invoke-CIPPOffboardingJob {
Remove-CIPPMailboxPermissions -PermissionsLevel @('FullAccess', 'SendAs', 'SendOnBehalf') -userid 'AllUsers' -AccessUser $UserName -TenantFilter $TenantFilter -APIName $APINAME -ExecutingUser $ExecutingUser

} else {
$Queue = New-CippQueueEntry -Name "Offboarding - Mailbox Permissions: $Username" -TotalTasks 1
$InputObject = [PSCustomObject]@{
Batch = @(
[PSCustomObject]@{
'FunctionName' = 'OffboardingMailboxPermissions'
'FunctionName' = 'ExecOffboardingMailboxPermissions'
'TenantFilter' = $TenantFilter
'User' = $Username
'executingUser' = $ExecutingUser
'QueueId' = $Queue.RowKey
}
)
OrchestratorName = "OffboardingMailboxPermissions_$Username"
Expand Down

0 comments on commit 3dc6551

Please sign in to comment.