Search code examples
azuremicrosoft-graph-apimicrosoft-graph-sdks

MS Graph account mailbox settings mail auto forwarding (C#)


Is there any way to set the mailbox auto forwarding using graph api or sdk? https://support.microsoft.com/en-us/office/turn-on-automatic-forwarding-in-outlook-7f2670a1-7fff-4475-8a3c-5822d63b0c8e

well i know a similar question asked 2years ago. However, it's 2024 now. Is it still not possible?


Solution

  • Yes, it's still not possible to set the mailbox auto forwarding using Microsoft Graph API.

    You can upvote this idea here techcommunity.microsoft.com/t5/microsoft-365-developer-platform/…

    Alternatively, make use of below PowerShell command by connecting Exchange Online to enable auto forwarding of user's mailbox:

    Connect-ExchangeOnline
    Set-Mailbox -Identity "[email protected]" -ForwardingSmtpAddress "[email protected]"
    

    Response:

    enter image description here

    This enabled mailbox auto forwarding when I checked user's Outlook like this:

    enter image description here