Suppressing Calendar Invites when using the Graph API for Mailbox Migrations with your Destination Tenant

Applies to

This article applies to mailbox migration projects that use the Microsoft Graph API and have Microsoft 365 as the destination as shown in the below list:

Symptoms

During a migration pass, attendees of migrated calendar events receive meeting invitations from the migrated mailbox. This can happen:

  • On the first migration pass.
  • Again, when a pass is reset and run a second time.

Invitations can also be sent for past meetings, so the original guests of historic events may receive them again.

The body of a migrated event may contain text similar to the following:

[Originally organized by: user@source-domain.com <user@source-domain.com>]

Cause

When a migration uses Exchange Web Services (EWS), it can tell Exchange Online not to send invitations while it writes calendar items. This is called the SuppressInvites behavior. Microsoft Graph does not have an equivalent option, so Exchange Online sends invitations when the migration writes calendar items through Graph.

Microsoft has acknowledged this gap and plans to add support for it, but the change is not expected until after the New Year. When Microsoft releases it, BitTitan will update the migration to use it.

Options

Until Microsoft adds support for suppressing invitations in Graph, you can choose one of the following options:

  • Use an EWS-based migration instead of Graph. EWS migrations are not affected by this issue, so you can use one until Microsoft adds support for suppressing invitations in Graph.
  • Allow invitations to be sent. Attendees will receive invitations for migrated calendar items. We do not recommend this option.
  • Block calendar invitations for the entire destination tenant while the migration runs. We do not recommend this option if people are already using the destination tenant.
  • Block invitations only for the users being migrated. This uses a mail-enabled security group and a transport rule and is described in the workaround below.

Workaround: Block Invitations for Migrating Users Only

This approach holds meeting messages sent by the users being migrated and leaves every other user in the destination tenant unaffected. The rule is created in Exchange Online PowerShell, not Graph. 

Before you start

  • You need the Exchange Administrator role, or another role that can manage transport rules, in the destination tenant.
  • If you are automating these steps, use app-only certificate authentication. If you are a managed service provider (MSP), use delegated admin access.
  • In the examples below, replace domain.onmicrosoft.com and the batch name with your own values.

Step 1. Create a group for the batch

Create one mail enabled security group per batch and hide it from the address list. Do this before the first calendar write for those users.

New-DistributionGroup -Name "MIG-InFlight-Batch07" -Alias "MIG-InFlight-Batch07" -Type Security -PrimarySmtpAddress "MIG-InFlight-Batch07@domain.onmicrosoft.com"

Set-DistributionGroup -Identity "MIG-InFlight-Batch07@domain.onmicrosoft.com" -HiddenFromAddressListsEnabled $true

Get-Group -Filter "Name -like 'MIG-InFlight*'" | Format-Table Name, DisplayName, PrimarySmtpAddress, RecipientTypeDetails, HiddenFromAddressListsEnabled

Step 2. Add only the batch mailboxes to the group

Add only the mailboxes that are in the migration batch. For example:

Add-DistributionGroupMember -Identity "MIG-InFlight-Batch07@domain.onmicrosoft.com" -Member "user1@domain.onmicrosoft.com"

Step 3. Create the transport rule

Scope the rule to messages sent by members of the group, and to calendaring messages only.

$params = @{
    Name               = "MIG-Calendar-Hold-Batch07"
    FromMemberOf       = "MIG-InFlight-Batch07@domain.onmicrosoft.com"
    MessageTypeMatches = "Calendaring"
    Quarantine         = $true
    SetAuditSeverity   = "High"
    Priority           = 0
    ActivationDate     = (Get-Date)
    ExpiryDate         = (Get-Date).AddDays(14)
    Comments           = "Temporary. Migration batch 07. Owner: <name>. Ticket: <id>"
    Mode               = "Enforce"
}
New-TransportRule @params

Notes on the rule:

  • FromMemberOf limits the rule to messages sent by members of the batch group.
  • MessageTypeMatches = "Calendaring" limits it to meeting messages.
  • ExpiryDate = is a fail-safe in case cleanup is missed.
  • Quarantine = $true holds the messages so that a copy is kept. You can redirect to a sink mailbox instead. Do not use delete.

Step 4. Wait for propagation

New rules and group changes can take time to take effect, so do not migrate any calendar events yet. Microsoft guidance has been up to about 30 minutes. Confirm the timing for your tenant.

Step 5. Run canary tests

Before migrating real data, create a test meeting from one mailbox in the group to a test recipient and confirm that it is intercepted. Then send one from a mailbox outside the group and confirm that it is delivered. Treat this as a hard gate. If the canary message leaks, stop and review the batch rule and retest.

Step 6. Migrate and reconcile

Run the migration and keep a record of each event that has attendees. When the batch finishes, compare the number of attendee events written with the number of messages held in quarantine or the sink mailbox. A mismatch means invitations leaked or took an unexpected path.

Step 7. Tear down

Remove each user from the group at cutover or disable the rule after the batch. Export the message trace and the held messages for your audit record, then remove the rule and the group. Record the creation and removal times.

Limitations

  • The rule is not surgical. It catches all meeting messages from those senders, including responses and cancellations, until cutover. This is acceptable for dormant mailboxes, so tell users to hold scheduling activity during the migration.
  • It applies to the organizer only. The rule blocks messages sent from the migrated user, so it covers events where that user is the organizer. It does nothing for events where the user is an attendee.
  • Quarantine retention is limited. Export held items within your retention policy window if you need them long term.
  • It adds administrative overhead. Per batch groups and rules add change control steps, and some customers may not allow a rule in their tenant.
  • Check the rule count and size limits in your tenant if you run many batches in parallel. A few well named rules are better than many.
Was this article helpful?
0 out of 0 found this helpful