Cannot convert value when you disable the Enable Forwarding option for a Microsoft 365 user

Original KB number:   2872435

Problem

You try to disable the Enable Forwarding option for a Microsoft 365 user's mailbox to disable mail forwarding. To do this, you click to clear the Enable Forwarding check box in the Exchange Admin Center. However, the check box is not cleared, and you receive the following error message:

Cannot convert value "to type "System.Boolean". Boolean parameters accept only Boolean values and numbers, such as $True, $False, 1 or 0.

Workaround

To work around this problem, use Windows PowerShell to disable forwarding for the user's mailbox. To do this, follow these steps:

  1. Connect to Exchange Online by using remote PowerShell. For more information about how to do this, go to Connect to Exchange Online PowerShell.

  2. Type the following command, and then press Enter:

    Set-Mailbox -Identity <User ID> -DeliveryToMailboxAndForward $False -ForwardingAddress $Null
    

Status

We're working to address this issue and will post more information in this article when that information becomes available.

More information

For more information about how to set up mail forwarding, go to Configure Mail Forwarding for a Mailbox.

Still need help? Go to Microsoft Community.