Skip to main content

Prerequisites

  • Azure account with permissions to create app registrations
  • Microsoft 365 admin access to enable Agent 365
  • Access to your Runlayer instance

Setup Steps

1

Enable Agent 365 Access

  1. Navigate to Microsoft Admin Center > Copilot Settings
  2. Under Web apps, enable access for all users or specific users
2

Create Azure AD App Registration

  1. Go to Azure Portal > App registrations
  2. Click New registration
  3. Configure the app:
    • Name: Choose a name (e.g., Runlayer Agent 365)
    • Supported account types: Accounts in this organizational directory only (Single tenant)
    • Redirect URI: Select Web and enter https://oauth.runlayer.com/v1/callback
  4. Click Register
3

Note the Application (Client) ID

  1. On the app’s Overview page, copy the Application (client) ID
  2. Save this for later - you’ll need it in Runlayer
4

Add API Permissions

  1. Go to Manage > API permissions
  2. Click Add a permission
  3. Select APIs my organization uses
  4. Search for Agent 365 tools (client ID: ea9ffc3e-8a23-4a7d-836d-234d7c7565c1)
  5. Grant the scopes under McpServers and McpServersMetadata for the servers you want to enable
  6. Click Add permissions
  7. If required, click Grant admin consent for your organization
5

Create Client Secret

  1. Go to Certificates & secrets
  2. Click New client secret
  3. Add a description and set expiry as long as possible (max 24 months)
  4. Click Add
  5. Copy the Value immediately - it’s only shown once
Note the expiration date. You’ll need to rotate the secret before it expires.
6

Add Server in Runlayer

  1. In Runlayer, go to Connectors > Add New
  2. Find a Microsoft Agent 365 server (e.g., Microsoft Teams, Microsoft Outlook Mail)
  3. Enable Bring your own credentials
  4. Enter your Client ID and Client Secret
  5. Click Create Hosted MCP
7

Configure Environment ID

The Agent 365 servers require your Power Platform environment ID in the server URL.
  1. Find your environment ID using Microsoft’s guide
  2. In the server configuration, replace the placeholder environment ID in the URL with your actual environment ID

Available Servers

All Microsoft Agent 365 servers share the same OAuth credentials:
ServerTools
Microsoft Teams25
Microsoft Outlook Mail20
Microsoft SharePoint & OneDrive15
Microsoft SharePoint Lists13
Microsoft Outlook Calendar12
Microsoft 365 User Profile6
Microsoft Word4
Microsoft 365 Copilot Search1
Microsoft 365 Admin Center1

Troubleshooting

If you can’t find “Agent 365 tools” when searching APIs:
  • Ensure you’re searching in APIs my organization uses, not “Microsoft APIs”
  • Verify Agent 365 access is enabled in the Microsoft Admin Center (Step 1)
  • The API may take a few minutes to appear after enabling access
Ensure the redirect URI is exactly: https://oauth.runlayer.com/v1/callback
  • No trailing slash
  • Must be Web platform type (not SPA or Mobile)

Next Steps