Now you’re less likely to miss what’s been brewing in our knowledge base with this weekly digest
Please, try again later.
When backing up public folders using Veeam Backup for Microsoft 365 the following error occurs:
Processing mailbox PublicFolderMailbox@xxxxxxxx.onmicrosoft.com failed with error: Failed to synchronize item changes in folder: FOLDERNAME.. Access is denied. Check credentials and try again., ICS synchronization failed.
Log Example:
Processing mailbox: PublicFolderMailbox@xxxxxxxx.onmicrosoft.com... Syncing folder items: FOLDERNAME... Exchange Web Services error code: ErrorAccessDenied Error: Failed to synchronize item changes in folder: FOLDERNAME. Type: Veeam.Ews.Internal.ExServerCodeException
Either of the following conditions may cause the error:
Veeam Backup for Microsoft 365 only supports backing up public folders located under the IPM_SUBTREE folder. Other locations are not supported (e.g., NON_IPM_SUBTREE).
To check if the public folder is located under the IPM_SUBTREE folder, run the following cmdlet and specify credentials used in Veeam Backup for Microsoft 365.
Connect-ExchangeOnline
Get-PublicFolder -Identity \ -Recurse | Format-List Name
Disconnect-ExchangeOnline -Confirm:$false
An output similar to the following must be displayed:
Name : IPM_SUBTREE Name : PublicFolderMailbox@*********.onmicrosoft.com Name : FOLDERNAME Name : Second Sub Folder Name : Third Sub Folder
Veeam Backup for Microsoft 365 uses the Veeam service account to back up public folders. When a public folder is created, it automatically inherits permissions from its parent folder.
Use the following PowerShell script to see the accounts with access to the public folders and their assigned permissions.
When prompted, specify the credentials used in Veeam Backup for Microsoft 365.
Connect-ExchangeOnline
Get-PublicFolder -Recurse |
Get-PublicFolderClientPermission |
Select-Object Identity, @{Expression={$_.User}; Label="User"}, @{Expression={$_.AccessRights}; Label="AccessRights"} |
Export-Csv C:\PublicFolderClientPermission.csv -NoTypeInformation
Disconnect-ExchangeOnline -Confirm:$false
To grant access, you will need to add your service account to public folders with the Owner permission.
To assign permissions, update the $user variable in the following script and run the script.
When prompted, specify credentials used in Veeam Backup for Microsoft 365.
# Set $user to the Veeam Backup for Microsoft 365 Service Account
$user = "VB365-Service-Account@yourdomain.onmicrosoft.com"
# Connect to Exchange Online
Connect-ExchangeOnline
# Get all public folders recursively
$folders = Get-PublicFolder -Recurse
# Loop through each public folder and add the specified user with Owner access rights
foreach ($folder in $folders) {
Add-PublicFolderClientPermission -Identity $folder.Identity -User $user -AccessRights Owner
}
# Disconnect from Exchange Online without confirmation prompt
Disconnect-ExchangeOnline -Confirm:$false
NOTE: It is recommended that PowerShell be used to assign permissions to public folders.
The following table shows an example of user permissions after the cmdlet is executed:
All PowerShell scripts provided above are intended to automatically retrieve and assign necessary permissions to ensure that no public folders are missed.
Please be aware that the commands and parameters may be altered by Microsoft in the future, which may break these scripts.
No support is provided by Veeam for these scripts. Should they fail, we ask that you please get in touch with Microsoft support.
These scripts may be updated periodically to reflect future changes in the Microsoft 365 PowerShell Environment.
Your feedback has been received and will be reviewed.
Please, try again later.
Please try select less.
This form is only for KB Feedback/Suggestions, if you need help with the software open a support case
Your feedback has been received and will be reviewed.
Please, try again later.