Skip to main content
Connect your AI Agents to Microsoft services including Outlook, Teams, OneDrive, and more.

Configuration

2

Microsoft Setup

  1. Register an app in Azure using Microsoft’s Quickstart: Register an application with the Microsoft identity platform documentation.
  2. During this process, Microsoft will generate an Application (client) ID and a Client Secret for your application; make note of these.
3

Auth0 Setup

  1. In the Auth0 Dashboard, go to Authentication > Social.
  2. Select Create Connection, then choose Microsoft.
  3. Click Continue.
  4. In General:
    1. Enter the Client ID and Client Secret from your Microsoft OAuth app.
    2. Under Permissions, select the scope(s) required for your application. These determine what permissions your application can request from Microsoft, whether for authentication (such as accessing basic profile details) or for API access (such as connecting to the provider's APIs).

      For a Dropbox and Google social connection, you must select Offline Access in the Auth0 Dashboard, enabling the client application to obtain an Auth0 refresh token.
    3. Add any additional scopes your application requires in the Additional Scopes field.
  5. In Purpose, toggle on Use for Connected Accounts for Token Vault. This lets the connection retrieve and securely store access tokens for external APIs. Learn more in Connected Accounts for Token Vault.
  6. Click Create.
  7. After creation, you are redirected to the Applications page. Select the application(s) to enable this connection for.
    Note: In a new Auth0 tenant, you can select the Default App.
  8. Once you have created your Microsoft social connection, test your connection to ensure the setup is working correctly before using it in your application.
This guide walks you through setting up the Microsoft connection in Auth0. For an end-to-end example that shows how to set up your app to call third-party APIs on the user's behalf using a connection like this, read the Call Other's APIs on User's Behalf Quickstart.

Token Vault configuration example

To configure the Token Vault for your Microsoft connection, you can use the following code snippet in your application:
  • JavaScript
  • Python
const auth0AI = new Auth0AI(); export const withWindowsLiveConnection = auth0AI.withTokenVault({ connection: "windowslive", scopes: [ // Required scopes for Token Vault "scope1", "scope2", // Optional Scopes specific for your app ... ], refreshToken: getAuth0RefreshToken(), });

Next steps