Skip to content
Last updated

Microsoft 365 integration

Microsoft 365 is Microsoft's suite of productivity and collaboration apps. This is a unified integration over Microsoft Graph — a single OAuth app that covers Entra ID (users and groups), Outlook mail and contacts, Calendar, Teams, OneDrive and Excel, SharePoint, To Do, and OneNote. Integrating Microsoft 365 with Frontegg lets your application work across all of these on behalf of your users through Frontegg's integration layer. Microsoft 365 authenticates with OAuth 2.0 (Authorization Code flow) via Microsoft Entra, so you register an app in the Microsoft Entra admin center to obtain a Client ID and Client Secret.


Prerequisites

Connect to Microsoft 365

You register an application in Microsoft Entra. The app provides the Application (client) ID and a Client Secret, and defines the redirect URI that Microsoft returns users to after they authorize access. For single-tenant apps you also provide your Directory (tenant) ID.

Step 1: Register an application

Sign in to the Microsoft Entra admin center and go to Entra ID → App registrations. Click New registration, enter a name (for example Frontegg Integration), choose the supported account types that match your use case, and click Register.

Step 2: Copy the Application (client) ID and Directory (tenant) ID

On the app's Overview page, copy the Application (client) ID — this is your Client ID. If your app is single-tenant, also copy the Directory (tenant) ID. For multi-tenant apps, you can leave the tenant ID as common in Frontegg.

Microsoft Entra app Overview page showing the Application (client) ID and Directory (tenant) ID

Step 3: Add the redirect URI

Open Authentication, add a Web platform (if not already present), and set the redirect URI to your Frontegg Redirect URL: https://YOUR_MCP_GATEWAY_URL/integration-callback

Microsoft Entra Authentication page with a Web redirect URI

Step 4: Create a client secret

Open Certificates & secrets → Client secrets and click New client secret. Add a description and an expiry, then click Add. Copy the secret Value immediately.

Copy your Client Secret now

The secret Value is shown only once, right after you create it — Entra masks it afterward and shows only the Secret ID. Copy it immediately and store it securely; treat it like a password. If you lose it, create a new client secret.

Microsoft Entra Certificates & secrets page with a client secret

Step 5: Configure Microsoft Graph permissions

Open API permissions. Frontegg requests the Microsoft Graph delegated permissions it needs during authorization, but for organization-wide use an administrator may need to click Grant admin consent so users are not prompted individually. Use Add a permission → Microsoft Graph → Delegated permissions if you want to pre-configure them.

Microsoft Entra API permissions page for Microsoft Graph

Configure the Frontegg portal

Once you have your Client ID and Client Secret, configure the integration in the Frontegg portal:

  1. Open the Frontegg portal and navigate to [ENVIRONMENT] → Integrations → Microsoft 365.
  2. Enter the Client ID (Application (client) ID) and the Client Secret.
  3. Enter your Directory (tenant) ID for a single-tenant app, or leave it as common for a multi-tenant app.
  4. Click Save.

Keep your credentials secure

Never share or commit your Client Secret to version control.

Scopes

Frontegg requests Microsoft Graph delegated permissions covering the connected services, plus the OIDC basics (openid, profile, email) and offline_access for refresh tokens:

AreaMicrosoft Graph permissions
Users & directoryUser.Read, User.Read.All, User.ReadWrite.All, Group.Read.All, Group.ReadWrite.All, Application.Read.All, Directory.Read.All
Mail & contactsMail.Read, Mail.ReadWrite, Mail.Send, MailboxSettings.Read, MailboxSettings.ReadWrite, Contacts.Read, Contacts.ReadWrite
CalendarCalendars.Read, Calendars.Read.Shared, Calendars.ReadWrite
TeamsTeam.ReadBasic.All, Team.Create, Channel.ReadBasic.All, Channel.Create, ChannelMessage.Read.All, ChannelMessage.Send, Chat.Read, Chat.ReadWrite, Chat.Create, OnlineMeetings.ReadWrite, TeamMember.Read.All
Files (OneDrive / Excel)Files.Read, Files.Read.All, Files.ReadWrite, Files.ReadWrite.All
SharePointSites.Read.All, Sites.ReadWrite.All, Sites.Manage.All, Sites.FullControl.All
Tasks (To Do)Tasks.Read, Tasks.ReadWrite
Notes (OneNote)Notes.Read, Notes.Create, Notes.ReadWrite

Additional resources