Connecting with Microsoft Copilot Studio Via AI Gateway
Connecting with a Microsoft Copilot Studio via AI Gateway.
Before you begin
Role required: Workspace user
Procedure
- Log in to MCP client (https://copilotstudio.microsoft.com).
-
Creating an agent.
- Navigate to Agents.
- Select +New agent.
- While creating an agent, navigate to the Configure tab.
- Enter the Name.
- Enter the description.
-
Select Create.
An agent is created.
-
Adding tools to the agent in Microsoft Copilot Studio
- Open the Agent and navigate to Tools tab.
- Select +Add a tool.
- Select Model Context Protocol icon.
- Select +New tool.
-
Select Model Context Protocol.
Displays Add a model Context Protocol server (preview) window.
-
Enter the Server name, Server description, and Server URL.
The MCP server URL is the Server URL and the details are available in the AI Gateway setup tab.
- Select Authentication: OAuth 2.0.
- Select type: Manual.
-
Enter the Client ID and Client secret.
The Client ID and Client secret details are available in the MCP server record created for Microsoft Copilot Studio.
-
Enter the Authorization URL and Token URL template.
The Authorization endpoint URL and Token URL template are available on the AI Gateway setup tab.
-
Enter the Refresh URL.
The Refresh URL is same as the Token URL.
-
Select Create.
Your tool gets created successfully and generates a Redirect URL.
- Copy the Redirect URL and paste in the Redirect URL field in the MCP server record.
- Select Save to save the MCP server record.
- Navigate to ALL > Application registry and look for the Copilot MCP server record.
-
Verify to change the values of Always use PKCE and Public Client from True to False of the server record.
This step is only applicable for Microsoft Copilot Studio.
- Save the Copilot MCP server record.
- Navigate back to the Copilot Studio.
- Select Next.
- Select Create new connection.
- Select Approve.
- After getting connected, select Add to agent.
-
Open the connection manager and provide authentication to Copilot.
This step is only applicable for Microsoft Copilot Studio.
- Select Connect.
- Select Submit.