Skip to content
Docs
opendesk.shOpen app

Microsoft 365 and Outlook

Forward a Microsoft 365 or Outlook.com mailbox to opendesk and send replies from your address with Microsoft sign-in, Microsoft's SMTP server or a sending service.

A Microsoft 365 or Outlook.com mailbox receives by forwarding: Microsoft passes incoming mail on to a private opendesk address. Replies go out from your address in one of these ways:

  • Microsoft, when your instance offers it. You approve sending once, and replies go out through Microsoft 365 and land in the mailbox’s Sent folder. opendesk gets permission to send mail as you and nothing else: it cannot read, change or delete your mail. See Send with Microsoft.
  • Microsoft’s SMTP server, when your admin allows SMTP AUTH. See Turn on SMTP AUTH.
  • A sending service such as Resend or Postmark, over SMTP, once it has verified your domain. See Send with a sending service.

On your own instance, a mailbox can also send through opendesk.

Microsoft 365 blocks forwarding to outside addresses until an admin allows it, so plan for one admin step. See Allow forwarding to outside addresses.

  1. Add the mailbox and pick forwarding

    In Settings, open Mailboxes and click Add mailbox. Type a name and the address. opendesk shows Microsoft 365 or Outlook.com. Keep Forward mail to opendesk selected and click Continue.

  2. Send replies with Microsoft

    Under How replies are sent, keep Connect Microsoft selected and click Continue with Microsoft. Pick the Microsoft account for the address and accept the permissions. Microsoft sends you back to opendesk with the mailbox connected.

    Some organizations require an admin to approve new apps. If you see Need admin approval, ask a Microsoft 365 admin to grant consent for opendesk.

  3. Forward the mail

    opendesk shows the private address to forward to. An admin allows automatic forwarding to outside addresses in the Microsoft Defender portal, then forwards the mailbox in the Exchange admin center, or you create an Outlook rule. Forwarding has every step.

  4. Send a test email

    Write to the address from another account. It shows up in Unassigned as a new ticket, and your reply goes out through Microsoft 365.

Scope Why
openid, email Identify which Microsoft account was connected.
offline_access Keep sending after you close the browser.
https://graph.microsoft.com/Mail.Send Send the replies your team writes, from your address.
https://graph.microsoft.com/User.Read Read the account’s basic profile, such as its address.

This is send-only access. opendesk cannot read, search, change or delete the mail in your mailbox with it. Tokens are encrypted at rest with AES-GCM.

On your own instance, Microsoft sign-in for mailboxes needs your own Microsoft app (MICROSOFT_CLIENT_ID and MICROSOFT_CLIENT_SECRET), and MICROSOFT_MAILBOX_OAUTH turns it on or off for new mailboxes. See Google and Microsoft OAuth and Mailbox sign-in.

When your instance doesn’t offer Microsoft for sending, replies go out through Microsoft’s SMTP server, or a sending service that has verified your domain.

  1. Microsoft 365, found from the domain’s MX records. Outlook.com, Hotmail and Live addresses show as Outlook.com.
  2. Why forwarding: Microsoft turned off password sign-in over IMAP, so a password can’t read the mailbox.
  3. Forward mail to opendesk, recommended.
  1. Add the mailbox and pick forwarding

    In Settings, open Mailboxes and click Add mailbox. Type a name and the address, keep Forward mail to opendesk selected and click Continue.

  2. Choose how replies are sent

    Under How replies are sent, Your SMTP server is the way listed. Replies come from your address itself, through smtp.office365.com on port 587 with STARTTLS. This needs SMTP AUTH turned on for the mailbox (see Turn on SMTP AUTH). The server, port and security are filled in; type the mailbox’s password and click Connect. opendesk signs in to the SMTP server before it saves anything.

    To send through a sending service instead, pick it under Using a sending service? and paste its credentials.

  3. Copy the forwarding address

    After you click Connect, the last step shows the private address to forward to, with a copy button, and the steps for Microsoft 365. You can find both again on the mailbox’s page.

  4. Allow forwarding to outside addresses

    Microsoft 365 blocks automatic forwarding to outside addresses by default. An admin allows it in the Microsoft Defender portal: Email & collaboration, Policies & rules, Threat policies, Anti-spam. Create an outbound policy for the support mailbox only (the tidier choice), or open Anti-spam outbound policy (Default), and set Automatic forwarding rules to On - Forwarding is enabled.

  5. Forward the mail in Microsoft

    As an admin, in the Exchange admin center, open Recipients, Mailboxes and select the mailbox. Under Mail flow settings, choose Manage email forwarding, turn on forwarding, paste the address and keep Deliver to both on if the mailbox should keep a copy. Without admin rights, use an Outlook rule instead. Forwarding has both, step by step.

    Then write to the address from another account. The email shows up in Unassigned as a new ticket.

Sending replies through Microsoft’s SMTP server needs SMTP AUTH (authenticated SMTP) for the mailbox. Many organizations keep it off. An admin turns it on for one mailbox:

  1. Open the user in the Microsoft 365 admin center

    In the Microsoft 365 admin center, open Users, Active users, and select the user for the support address.

  2. Allow Authenticated SMTP

    On the Mail tab, choose Manage email apps, tick Authenticated SMTP and click Save changes. It can take up to an hour to apply.

The same in Exchange Online PowerShell:

Terminal window
Set-CASMailbox -Identity support@contoso.com -SmtpClientAuthenticationDisabled $false

If your admin keeps SMTP AUTH off, send with Microsoft, or through a sending service.

Nothing is saved when Microsoft refuses. The wizard shows the cause and the fix, with Microsoft’s own reply underneath.

What you see What to do
SMTP sign-in is turned off in Microsoft 365 Turn on SMTP AUTH for the mailbox, as above, or send with Microsoft.
Microsoft security defaults block passwords Security defaults refuse passwords over SMTP and IMAP. Send with Microsoft, or through a sending service.
A Microsoft sign-in policy blocked this A Conditional Access policy refused the password. Send with Microsoft or through a sending service, or ask your admin to allow SMTP AUTH for this mailbox.
Microsoft needs Microsoft sign-in Exchange Online doesn’t accept a password over IMAP. Forward the mail, and send with Microsoft.
Microsoft did not accept the password Check the address and password, including the sign-in address if it differs from the mailbox address. An account with multi-factor sign-in can’t use a password here.

On a self-hosted instance with IMAP receiving on (MAILBOX_IMAP, the default), Choose another way also lists Sign in with Microsoft, which syncs the mailbox over IMAP instead of using forwarding. opendesk then reads new mail over IMAP (outlook.office365.com) and sends replies through Microsoft, with no forwarding to set up. opendesk Cloud receives by forwarding.

Syncing asks for one more permission, https://outlook.office.com/IMAP.AccessAsUser.All, which lets opendesk read the mailbox. Your Microsoft app needs it, as described in Google and Microsoft OAuth. Choose forwarding to keep the connection send-only.

In Microsoft 365, IMAP can be turned off per mailbox. For a synced mailbox, an admin turns it on in the Microsoft 365 admin center under Users, Active users: select the user, then Mail, Manage email apps, and tick IMAP.

Remove the mailbox in opendesk, under Mailboxes. Then, at Microsoft:

  • Forwarding: turn off the forwarding or the Outlook rule, so mail stops going to the old address.
  • Microsoft: remove opendesk from My apps, or as an admin from Enterprise applications in Microsoft Entra.
  • SMTP: change the mailbox’s password, or turn SMTP AUTH off again.

Edit this page on GitHub