Skip to content

Language independent permission settings for AgendaX on Exchange Server 2013, 2016, 2019, Office / Microsoft 365

Permissions that need to be set for the AgendaX account on Exchange Server 2013, 2016, 2019, and Office 365 / Microsoft 365 are Outlook folder level permissions.

Since folder names in Outlook differ depending on the language used when the mailbox is first opened with Outlook, you have to know which employee uses which language to assign permissions to the correct folders. In addition to that, you have to know what the folders are called in these languages.

If you have mailboxes in multiple languages in your company, you can easily set the required permissions for the AgendaX account using the following script.

Please make sure you replace “agendax@company.com” on the 3rd line with the name of your AgendaX account:

foreach ($Mailbox in (Get-Mailbox -ResultSize Unlimited))
{
  $AgendaXAccount = "agendax@company.com"

  $CalendarStat = Get-MailboxFolderStatistics -Identity $Mailbox -FolderScope Calendar | Where {$_.FolderType -eq "Calendar"}
  $CalendarName = "$($Mailbox.Name)" + ":\" + "$($CalendarStat.Name)"

  Write-Host "Applying permissions to mailbox: $($Mailbox.Name) (TOIS/$($CalendarStat.Name))"
 
  $AccRightTOIS = Get-MailboxFolderPermission -identity $Mailbox.Name -user $AgendaXAccount >$null 2>&1
  $AccRightCalendar = Get-MailboxFolderPermission -identity $CalendarName -user $AgendaXAccount >$null 2>&1

  If ($AccRightTOIS.AccessRights -ne "Reviewer")
  {
    Remove-MailboxFolderPermission -Identity $Mailbox.Name -User $AgendaXAccount -Confirm:$false >$null 2>&1
    Add-MailboxFolderPermission -identity $Mailbox.Name -AccessRights Reviewer -User $AgendaXAccount >$null 2>&1
  }
  If ($AccRightCalendar.AccessRights -ne "Editor")
  {
    Remove-MailboxFolderPermission -Identity $CalendarName -User $AgendaXAccount -Confirm:$false >$null 2>&1
    Add-MailboxFolderPermission -identity $CalendarName -AccessRights Editor -User $AgendaXAccount >$null 2>&1
  }
}

Just copy and paste the above script into Powershell. It will assign Reviewer rights on the top of the mailbox as well as Editor rights on the Calendar folder.

Back To Top