Navigation

10.11. Connect Microsoft 365 Inbound Email to Create Tickets

Connect a Microsoft 365 or Exchange Online mailbox so AlgaPSA turns incoming email into tickets. Covers the Set up Microsoft wizard, app registrations, the mailbox form, the Sign in with Microsoft step, and troubleshooting.

10.11. Connect Microsoft 365 Inbound Email to Create Tickets
Connect a Microsoft 365 or Exchange Online mailbox so AlgaPSA turns incoming email into tickets. Covers the Set up Microsoft wizard, app registrations, the mailbox form, the Sign in with Microsoft step, and troubleshooting.
10. SettingsUpdated: 11/19/2026

Most MSPs run their service desk through a shared mailbox such as support@yourmsp.com. This guide connects that Microsoft 365 (Exchange Online) mailbox to AlgaPSA. Once connected, AlgaPSA watches the mailbox and turns each new message into a ticket on the board you choose.

A connected Microsoft mailbox can send as well as receive.

Connecting a mailbox sets up inbound ticket creation. The same mailbox can then be selected as your outbound provider, so ticket replies and notifications go out through Microsoft Graph and are saved to the mailbox's Sent Items. See Set up outbound email below.

This guide covers inbound email for ticket creation. To sync Microsoft 365 users into AlgaPSA contacts instead, see Sync Microsoft Entra Tenants and Contacts. That is a separate integration.

The examples below use a fictional MSP, Northwind MSP, connecting its support mailbox support@northwindmsp.com.

Setup has three parts, in this order:

  1. Set up a Microsoft app in Providers (once per AlgaPSA tenant).
  2. Choose which app Outlook email uses.
  3. Add the mailbox on the Inbound Email tab, sign in with Microsoft, and then click Add Provider.

Prerequisites

  1. AlgaPSA access: You are an administrator with permission to manage system settings.
  2. A mailbox to connect: A licensed user mailbox, or a shared mailbox that the authorizing user can read.
  3. A Microsoft 365 administrator: Every setup path needs an administrator of your Microsoft 365 organization to approve the app's permissions once. If you register the app yourself, you also need permission to create app registrations in Microsoft Entra.
  4. A publicly reachable server, or polling: Microsoft Graph pushes new-mail notifications to https://<your-host>/api/email/webhooks/microsoft, so your AlgaPSA base URL should be reachable from the internet. If Microsoft cannot validate that URL, AlgaPSA switches the mailbox to polling automatically and mail still becomes tickets, up to three minutes later.

Step 1: Set up a Microsoft app

Credentials are entered only here. The mailbox form in Step 3 does not ask for a client ID or secret.

  1. Navigate to Settings > General in the sidebar to open Admin Settings, then select Integrations (under Data & Integration) and open the Providers tab.
  2. In the Microsoft section, click Set up Microsoft. The button is shown until a Microsoft app is ready for email.
  3. The Set up Microsoft dialog asks how AlgaPSA connects to Microsoft. You connect mailboxes separately afterwards. Choose one of three options:
OptionWhat happensWhen to choose it
Use the app provided by AlgaPSA (Recommended)Nothing to register in Microsoft Entra. Your Microsoft 365 administrator approves access to the app Nine Minds operates.Hosted AlgaPSA. Not offered on self-hosted installs.
Create an app in your Microsoft organizationAlgaPSA registers a dedicated Entra app for you. You sign in as a Microsoft 365 administrator.You want your own app registration without creating it by hand. Shows an Unavailable badge when the install cannot create apps.
Enter an existing app manually (Advanced)You paste the client ID, tenant ID, and secret of an Entra app your organization maintains.You already have a registration, or policy requires you to own it.

Option A: Use the app provided by AlgaPSA

  1. Enter a Profile display name (the default is AlgaPSA Microsoft Email) and your Microsoft tenant ID or verified domain, for example northwindmsp.com.
  2. Click Create profile and continue.
  3. The dialog shows Waiting for admin approval. Click Approve in Microsoft if you are a Microsoft 365 administrator, or Copy approval link for your admin and send it to one. The link outlives the dialog, so the admin can approve later.
  4. Once approved, the dialog shows Microsoft is ready. Click Finish. The Providers page now shows Microsoft email is ready to connect with a Connect a mailbox link.

Option B: Create an app in your Microsoft organization

  1. Enter a Profile display name. This becomes the app's name in Entra.
  2. Click Sign in to Microsoft and sign in as a Microsoft 365 administrator in the popup.
  3. AlgaPSA registers a multi-tenant app with both redirect URIs and the delegated Microsoft Graph permissions Mail.Read, Mail.Read.Shared, Mail.Send, Mail.Send.Shared, User.Read, and offline_access. It asks for nothing broader. Review the consent screen before approving.
  4. Approve access as in Option A, then click Finish.

Option C: Enter an existing app manually

Register the app in Entra first.

  1. Open the Microsoft Entra admin center and create an App registration.
  2. Set the sign-in audience. Accounts in any organizational directory (multi-tenant) is the simplest choice and works with the Microsoft tenant ID left at its default, common. A single-tenant app (Accounts in this organizational directory only) also works, but you must enter the app's directory (tenant) ID as the Microsoft tenant ID in AlgaPSA. AlgaPSA then signs in through that directory instead of the common endpoint.
  3. Add a redirect URI of type Web. The dialog shows the exact value as Redirect URI to add in Entra with a Copy button; it has the form https://<your-host>/api/auth/microsoft/callback.
  4. Under API permissions, add the delegated Microsoft Graph permissions Mail.Read, Mail.Read.Shared, Mail.Send, Mail.Send.Shared, User.Read, and offline_access. These are the permissions AlgaPSA requests when the mailbox signs in. Grant admin consent.
  5. Create a client secret and copy its Value (not its Secret ID). Note the Application (client) ID and, for a single-tenant app, the Directory (tenant) ID.

Back in the Set up Microsoft dialog, fill in Profile display name, Client ID, Microsoft tenant ID, and Client secret, then click Save app and continue.

Creating an app registration without the wizard

You can also add a manual app directly on the Providers page. Click New app registration (under Manual Microsoft apps (advanced) on Enterprise Edition) or Create Microsoft app when no apps exist yet. The Create Microsoft app registration dialog has these fields:

FieldWhat to enter
Display nameA label for this app in AlgaPSA, such as Northwind production app.
Client IDThe Application (client) ID from Entra.
Microsoft tenant IDRequired. Leave it as common for a multi-tenant app, or enter the directory (tenant) ID for a single-tenant app.
Client secretThe secret Value from Entra.
Set this as the default Microsoft appTurn on if this is your only Microsoft app.
Services this app can handleCheck Outlook email. Only checked services can use this app.

Click Create app registration. The saved app appears under Microsoft app registrations with a Ready badge. On Enterprise Edition its card lists the Inbound email redirect URI, the Email setup redirect URI, and scopes under Values to copy into Microsoft Entra. Each value has a Copy button; add both redirect URIs to the app registration in Entra.


Step 2: Choose the app for Outlook email

On the same Providers tab, find the Which Microsoft app each service uses section. In the Outlook email row, select the app you just set up. The row shows Bound once saved.

This choice is the app pre-selected for new mailbox connections. Existing mailbox connections keep their current Microsoft app until they are reconnected.


Step 3: Add the mailbox as an inbound provider

  1. Navigate to Settings > General in the sidebar to open Admin Settings, then select Email (under Communication) and open the Inbound Email tab.
  2. Click Add Email Provider, then click Set up Microsoft 365 on the Microsoft 365 card.
  3. Fill in the form:
SectionFieldWhat to enter
Basic ConfigurationConfiguration NameAn internal name, such as Northwind Support Mailbox. Not shown in outbound emails.
Email AddressThe mailbox to watch, such as support@northwindmsp.com.
Sender Display NameOptional. The From name on outbound ticket emails when this mailbox is also your outbound ticketing address. Leave blank to use the ticket board name.
Enable this providerOn by default.
Ticket DefaultsInbound Ticket DefaultsThe board, status, priority, and catch-all client for email-created tickets. Click Manage defaults to create a set, then Refresh list. You can save without one, but the provider card then warns that emails will not process until one is selected.
Connect Microsoft 365Microsoft app that authorizes this mailboxChoose the app that signs in as this mailbox: AlgaPSA app (managed by Nine Minds) on hosted installs, or one of your own apps listed by name and client ID. The app bound in Step 2 is pre-selected.
Advanced SettingsFolder FiltersComma-separated folders to monitor. Defaults to Inbox. Use the exact folder name as it appears in Outlook and write nested folders as Inbox/Subfolder. AlgaPSA monitors the first folder in the list. If that folder cannot be found, the card's connection test reports Folder was not found in this mailbox and the subscription falls back to the Inbox.
Max Emails Per Sync1 to 1000 messages per sync. Defaults to 50.
  1. Click Sign in with Microsoft. AlgaPSA saves the provider, opens a Microsoft popup, and the button reads Signing in…. Sign in with an account that can read the mailbox and accept the permissions. The popup closes on its own and the button changes to Connected.
  2. Click Add Provider. This is a separate step: it registers the Microsoft Graph webhook subscription and marks the provider connected. Until you click it, the mailbox has tokens but no subscription.

The provider card now shows Connected, and its Delivery field reads Real-time delivery: active. New email in the mailbox becomes tickets.

If the form shows To connect Microsoft 365, first set up a Microsoft app in Providers, then come back., no app is ready yet. Go back to Step 1.

To change a mailbox later, open Edit Configuration on its card, make the change, and click Update Provider. If you switch the Microsoft app, the form shows Pending reauthorization and you must click Sign in with Microsoft again before Update Provider.


How the connection behaves

  • By default, Microsoft Graph pushes a notification to AlgaPSA when new mail arrives.
  • Graph subscriptions are short-lived. AlgaPSA requests a 60-hour window, renews subscriptions in the background before they expire, and registers a new one if Microsoft reports the old one gone. Use Retry Renewal on the card's menu to force a renewal.
  • Inbound processing does not modify the mailbox. AlgaPSA does not mark messages as read or move them.
  • The card's menu also offers Run Microsoft 365 Diagnostics, which checks the token, the granted scopes, and mailbox access.

Operational check: After connecting, send a test email to the mailbox and confirm a ticket appears on the configured board within a few minutes.

Delivery mode: webhook or polling

Each Microsoft provider card shows a Delivery field with one of two values:

ValueWhat it means
Real-time delivery: activeMicrosoft Graph pushes new-mail notifications as they arrive
Polling every 3 minutesAlgaPSA checks the mailbox on a timer; no webhook is in use

AlgaPSA switches a mailbox to polling on its own when Microsoft cannot validate the webhook URL, which happens on on-premise and restricted-network installs where Microsoft cannot reach your host. There is no manual switch. While polling, AlgaPSA periodically retries the subscription and returns to real-time delivery when it succeeds.

Pausing an inbox

Open the card's menu and choose Pause inbound email. The card shows a Paused badge and the note Messages received while this inbox is paused are not imported retroactively. Choose Resume inbound email to continue.

Pause an inbox when you are testing routing rules, migrating a mailbox, or working through a backlog you do not want turned into tickets.

If the mailbox's credentials stop working, AlgaPSA pauses it for you and the card shows Inbound email paused — reconnection required with a Reconnect button. Messages are not lost; they stay in the mailbox and are imported after you reconnect.


Set up outbound email

Connecting the mailbox sets up receiving. Sending is configured separately on the Outbound Email tab, where Email Provider offers SMTP (Traditional Email Server), Resend (Modern API Service), and Microsoft 365 (Microsoft Graph). Which options your edition and plan include is listed in Set Up Outbound Email over SMTP.

Sending through the connected mailbox

  1. Navigate to Settings > General in the sidebar to open Admin Settings, then select Email (under Communication) and open the Outbound Email tab.
  2. Under Email Provider Configuration, set Email Provider to Microsoft 365 (Microsoft Graph) and choose the connected mailbox.

Messages are then sent as that mailbox through Microsoft Graph and saved to its Sent Items, so your team sees the full conversation in Outlook. Reply-threading headers are preserved, so client replies thread back onto the original ticket.

Sending requires the Mail.Send permission. Mailboxes connected with the current sign-in flow already have it. A mailbox connected before Mail.Send was requested fails with Microsoft Mail.Send consent is missing. Reconnect the mailbox and grant outbound mail permission. Open the mailbox, click Sign in with Microsoft again, then Update Provider.

For the other options, see Set Up Outbound Email over SMTP and Set Up a Custom Outbound Email Domain.

Whichever you choose, set the Ticketing From address to the same address as the connected mailbox, for example support@northwindmsp.com. See Configure Ticket Reply-To Email.


Troubleshooting

"Provider saved but setup incomplete: Microsoft 365 authentication failed. Reconnect the mailbox and try again."

This appears at the top of the mailbox form after you click Add Provider or Update Provider. The provider row is saved, but the Microsoft Graph subscription could not be created because AlgaPSA could not authenticate as the mailbox. The causes, from most to least likely:

  1. You clicked Add Provider before Sign in with Microsoft completed. The Add Provider button is never disabled, so it is possible to save a mailbox that has no Microsoft tokens yet. Check the button in the Connect Microsoft 365 section. If it still reads Sign in with Microsoft, click it, finish the popup, wait for it to read Connected, and only then click Add Provider. If the form has already closed, open the mailbox with Edit Configuration and do the same, finishing with Update Provider.
  2. The mailbox was disconnected and has no refresh token. This happens after Disconnect Microsoft providers on the Providers tab, after a secret rotation, or after a failed token refresh. Open the mailbox, click Sign in with Microsoft, then Update Provider.
  3. The Microsoft app's client ID or secret cannot be resolved. The app chosen under Microsoft app that authorizes this mailbox has been archived, has no stored secret, or no longer handles Outlook email. On the Providers tab, check the app's card for a Needs setup badge, edit it, and make sure Outlook email is checked under Services this app can handle. Then sign in to the mailbox again.
  4. Microsoft Graph rejected the subscription request with 401. The tokens exist but Graph refused them, usually because admin consent was revoked or the secret expired. Run Run Microsoft 365 Diagnostics from the card, fix what it reports in Entra, and sign in again.

In every case the fix ends the same way: Sign in with Microsoft until the button reads Connected, then Add Provider or Update Provider.

Microsoft rejects the sign-in popup

AlgaPSA maps the common Microsoft (AADSTS) rejections to these messages in the form:

MessageFix
Microsoft rejected the sign-in because this app registration is single-tenant. Enter the directory (tenant) ID on the Microsoft profile, or make the app multi-tenant (Accounts in any organizational directory).Edit the app on the Providers tab and set Microsoft tenant ID to the Directory (tenant) ID shown on the app's Overview page in Entra, or change the app's sign-in audience to multi-tenant and leave the tenant ID as common.
Microsoft could not find this app registration in the directory named by the profile's Tenant ID.The Microsoft tenant ID on the app points at the wrong directory. Enter the directory ID where the app was registered.
The account you signed in with belongs to a different directory than this single-tenant app.Sign in with an account from the app's own directory, or make the app multi-tenant.
Microsoft rejected the redirect URI because it is not registered on the app.Add the exact URI from the message under Authentication > Web redirect URIs in Entra. It must match character for character, including the host.
Microsoft rejected the client secret on the Microsoft profile. Make sure you saved the secret Value, not its Secret ID.Create a new secret in Entra, copy its Value, and edit the app in AlgaPSA.
The client secret on the Microsoft profile has expired.Create a new secret in Entra and update the app in AlgaPSA, then sign in to each mailbox again.
Microsoft needs a Microsoft 365 administrator to approve this app before anyone can connect.Ask a Microsoft 365 administrator to grant admin consent for the app's delegated permissions, then connect again.

Other problems

  • Sign in with Microsoft is disabled, or the form says "Choose a Microsoft app before signing in". Select an app under Microsoft app that authorizes this mailbox. If the list is empty and shows To connect Microsoft 365, first set up a Microsoft app in Providers, then come back., complete Step 1. If it shows Your Microsoft app is waiting for Microsoft 365 administrator approval., finish the approval on the Providers tab first.
  • The popup never opens, or the button stays on Signing in…. Your browser blocked the popup. The form reports Failed to open OAuth popup. Please allow popups for this site. Allow popups for your AlgaPSA host and try again. Closing the popup early shows Authorization window closed before completing. Please try again.
  • The mailbox is connected but outbound sending fails with a Mail.Send error. See Sending through the connected mailbox: sign in to the mailbox again so consent covers sending.
  • Incoming mail is not creating tickets. Check the card in this order: a Paused badge (resume it, or Reconnect if the pause was caused by failed credentials); a missing Inbound Ticket Defaults selection (the card warns that emails will not process until one is selected); and Delivery showing an error or an expired Subscription. Use Retry Renewal, then Run Microsoft 365 Diagnostics.
  • The card shows polling mode but you expected real-time delivery. Microsoft could not validate your webhook URL. Microsoft Graph does not follow HTTP redirects during validation, so a base URL that 301-redirects (for example a www. host that redirects to the apex) fails every subscription attempt with a 400 validation error and AlgaPSA falls back to polling. Set APPLICATION_URL, NEXTAUTH_URL, or NEXT_PUBLIC_BASE_URL (checked in that order) to the final resolved address, such as https://algapsa.example.com. AlgaPSA retries the subscription on its own and switches back once validation succeeds.
  • Mail arrives a few minutes late. The provider is in polling mode, which checks every three minutes. This is expected when Microsoft cannot reach your host.
  • The wrong folder is being watched, or mail from a subfolder is missing. Adjust Folder Filters on the mailbox and click Update Provider. Use the exact Outlook folder name and write nested paths as Inbox/Subfolder. AlgaPSA monitors the first folder in the list. If the card reports Folder was not found in this mailbox, the name does not match and the subscription has fallen back to the Inbox.

Related topics