MountainGoat · Email Sync

Outlook Email Sync (Microsoft Entra): MountainGoat Configuration Guide

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:

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.

1.Overview

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.

2.Prerequisites

Time required: about 15 minutes.

3.Register the application

  1. Sign in to the Microsoft Entra admin center at https://entra.microsoft.com (or https://portal.azure.com → Microsoft Entra ID).
  2. Go to Identity → Applications → App registrations → New registration.
  3. Name the application, for example MountainGoat PO Intake.
  4. Supported account types: Accounts in this organizational directory only (Single tenant).
  5. Under Redirect URI, choose platform Web and enter the value below, replacing {app.subdomain} with your subdomain label.
  6. Click Register, then copy the Application (client) ID and the Directory (tenant) ID from the Overview page.

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.

4.Add the read-only mail permissions

  1. In the app, go to API permissions → Add a permission → Microsoft Graph → Delegated permissions.
  2. Add all three: Mail.Read, User.Read, offline_access.
  3. Click Grant admin consent for [your tenant] and confirm, so users are not individually prompted and the grant stays under admin control.
PermissionWhy MountainGoat needs it
Mail.ReadRead purchase-order email from the connected mailbox. Read-only: no send, delete, or modify.
User.ReadIdentify the signed-in mailbox account during the connection step.
offline_accessKeep the mailbox synced with a refresh token instead of asking the owner to sign in repeatedly.

5.Create the client secret

  1. In the app, go to Certificates & secrets → Client secrets → New client secret.
  2. Add a description, for example MountainGoat, and choose an expiry of 12 or 24 months.
  3. Click Add, then copy the Value column immediately. It is shown only once.

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.

6.Enter the credentials in MountainGoat

Sign in to your MountainGoat instance as an administrator, then:

  1. Click Settings under the user profile.
  2. Select the Admin tab → API & CredentialsEmail CredentialsOutlook / Microsoft Graph Configuration.
MountainGoat fieldWhat 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.

7.Connect the mailbox

The person who owns the purchase-order mailbox completes the one-time connection:

  1. Sign in to MountainGoat and go to Settings → Admin → Setup → Inbox Connections.
  2. Click Connect Outlook.
  3. Sign in as the purchase-order mailbox account (or an account with delegated access to it) and approve Microsoft's read-only consent screen.

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.

8.Recommended hardening (optional)

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.

9.Troubleshooting

SymptomCauseFix
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).

10.Security and privacy notes

11.Support

For help connecting Outlook to MountainGoat, contact:

help@mountaingoat.ai

See also the companion Gmail setup guide and the Sign in with Okta configuration guide.