Prerequisites
- Azure account with permissions to create app registrations
- Microsoft 365 admin access to enable Agent 365
- Access to your Runlayer instance
Setup Steps
Enable Agent 365 Access
- Navigate to Microsoft Admin Center > Copilot Settings
- Under Web apps, enable access for all users or specific users
Create Azure AD App Registration
- Go to Azure Portal > App registrations
- Click New registration
- 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
- Name: Choose a name (e.g.,
- Click Register
Note the Application (Client) ID
- On the app’s Overview page, copy the Application (client) ID
- Save this for later - you’ll need it in Runlayer
Add API Permissions
- Go to Manage > API permissions
- Click Add a permission
- Select APIs my organization uses
- Search for Agent 365 tools (client ID:
ea9ffc3e-8a23-4a7d-836d-234d7c7565c1) - Grant the scopes under McpServers and McpServersMetadata for the servers you want to enable
- Click Add permissions
- If required, click Grant admin consent for your organization
Create Client Secret
- Go to Certificates & secrets
- Click New client secret
- Add a description and set expiry as long as possible (max 24 months)
- Click Add
- Copy the Value immediately - it’s only shown once
Add Server in Runlayer
- In Runlayer, go to Connectors > Add New
- Find a Microsoft Agent 365 server (e.g., Microsoft Teams, Microsoft Outlook Mail)
- Enable Bring your own credentials
- Enter your Client ID and Client Secret
- Click Create Hosted MCP
Configure Environment ID
The Agent 365 servers require your Power Platform environment ID in the server URL.
- Find your environment ID using Microsoft’s guide
- 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:| Server | Tools |
|---|---|
| Microsoft Teams | 25 |
| Microsoft Outlook Mail | 20 |
| Microsoft SharePoint & OneDrive | 15 |
| Microsoft SharePoint Lists | 13 |
| Microsoft Outlook Calendar | 12 |
| Microsoft 365 User Profile | 6 |
| Microsoft Word | 4 |
| Microsoft 365 Copilot Search | 1 |
| Microsoft 365 Admin Center | 1 |
Troubleshooting
'Agent 365 tools' not found in API permissions
'Agent 365 tools' not found in API permissions
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
Admin consent required
Admin consent required
If you see permissions stuck in “Not granted” status:
- An Azure AD admin must click Grant admin consent for [Organization]
- Contact your Azure administrator if you don’t have this permission
Invalid redirect URI error
Invalid redirect URI error
Ensure the redirect URI is exactly:
https://oauth.runlayer.com/v1/callback- No trailing slash
- Must be Web platform type (not SPA or Mobile)