MountainGoat · Email Sync
For Microsoft Entra administrators connecting a Microsoft 365 purchase-order mailbox to a MountainGoat instance.
This guide walks you through authorizing MountainGoat to read purchase-order email from one Microsoft 365 mailbox you choose. At a glance:
Mail.Read. MountainGoat cannot send, delete, or change any message, and it never sees a password.Looking for sign-in instead? This guide covers reading a purchase-order mailbox. To let your team sign in to MountainGoat with Entra, including SCIM user provisioning, see the Microsoft Entra ID SSO & SCIM guide. The two use separate app registrations.
MountainGoat finds purchase orders in a designated mailbox and turns them into structured, reviewable orders. To do that it needs read-only access to one Microsoft 365 mailbox, granted through Microsoft's standard OAuth 2.0 consent flow using the delegated authorization-code grant (Web, confidential client).
Three steps share the work:
Because this is the delegated flow, MountainGoat can only ever reach the mailbox of the account that signs in during the connection step. There is no tenant-wide access.
https://{app.subdomain}.mountaingoat.ai. Throughout this guide, {app.subdomain} is a placeholder for your subdomain label. Replace it everywhere it appears with your own label (for example acme, producing acme.mountaingoat.ai).Time required: about 15 minutes.
https://entra.microsoft.com (or https://portal.azure.com → Microsoft Entra ID).MountainGoat PO Intake.{app.subdomain} with your subdomain label.https://{app.subdomain}.mountaingoat.ai/api/oauth/outlook/callback
The redirect URI must match character for character. A trailing slash or http:// instead of https:// will make the connection fail. Copy and paste it.
Mail.Read, User.Read, offline_access.| Permission | Why MountainGoat needs it |
|---|---|
Mail.Read | Read purchase-order email from the connected mailbox. Read-only: no send, delete, or modify. |
User.Read | Identify the signed-in mailbox account during the connection step. |
offline_access | Keep the mailbox synced with a refresh token instead of asking the owner to sign in repeatedly. |
MountainGoat, and choose an expiry of 12 or 24 months.Calendar the secret expiry. When the client secret expires, the mailbox connection stops until a new secret is created and entered in MountainGoat. Set a rotation reminder 30 days before the expiry date.
Sign in to your MountainGoat instance as an administrator, then:
| MountainGoat field | What to enter |
|---|---|
| Client ID | The Application (client) ID from section 3. |
| Client Secret | The client secret Value from section 5. Stored encrypted and never displayed back. See the note below. |
| Tenant | The Directory (tenant) ID from section 3. Required for a single-tenant registration. |
| Redirect URI | https://{app.subdomain}.mountaingoat.ai/api/oauth/outlook/callback. Must match the Web redirect URI in Entra exactly. |
| Scopes | offline_access User.Read Mail.Read. This is the default; leave it as is. |
About the Client Secret. The secret is write-only in the Admin UI: you can enter or replace it, but MountainGoat never displays it back and stores it encrypted. On a later edit, leave the Client Secret blank to keep the existing secret. Only type in the field when you intend to replace it.
On a managed instance, MountainGoat can enter the credentials for you. Send them through a password manager share, a one-time secret link, or read them over a phone call, and include the secret's expiry date. Never put a client secret in the body of a normal email or chat message. If one ends up in an email thread, tell us and we will help you rotate it in minutes.
Click Save Outlook Config when you are done.
The person who owns the purchase-order mailbox completes the one-time connection:
MountainGoat stores an encrypted refresh token and begins read-only sync of that mailbox. Because this is the delegated flow, access is limited to the mailbox of the account that signs in here.
A note on mailbox scoping. You may see Exchange Application Access Policy referenced as a way to limit access to a single mailbox. That control applies to application (app-only) permissions and is not required here: MountainGoat uses the delegated flow, so access is already limited to whichever mailbox account signs in during section 7.
| Symptom | Cause | Fix |
|---|---|---|
Microsoft shows a redirect URI mismatch error (AADSTS50011) |
The redirect URI in Entra does not exactly match the one MountainGoat sends. | Compare both values character for character, including https:// and no trailing slash, in Entra and in the MountainGoat Redirect URI field. |
| Users are prompted for approval they cannot grant | Admin consent was not granted for the delegated permissions. | Click Grant admin consent in API permissions (section 4). |
| Sign-in fails with an audience or tenant error | The Tenant field in MountainGoat does not match the single-tenant registration. | Set the Tenant field to your Directory (tenant) ID and save. |
| Sync worked, then stopped | The client secret expired, or the grant was revoked. | Create a new secret (section 5), enter it in MountainGoat, and reconnect if needed (section 7). |
Mail.Read. MountainGoat cannot send, delete, or modify mail, and it never receives a password.For help connecting Outlook to MountainGoat, contact:
See also the companion Gmail setup guide and the Sign in with Okta configuration guide.