Creating a Microsoft Copilot Agent for Haiilo (MCP)

You can create and publish a Microsoft Copilot Declarative Agent that integrates with your Haiilo platform, enabling your organization's users to interact directly with Haiilo capabilities from Microsoft Copilot.

Before you begin: We recommend reviewing Understanding the Haiilo MCP integration to understand the integration's capabilities and available tools before completing the configuration steps.

Prerequisites

Step 1: Create an API Client in Haiilo

  1. In Haiilo, go to Administration > API clients.
  2. Select Create credential pair.
  3. Enter a suitable Client ID like "Haiilo-MCP".
  4. Under Grant Types, check Authorization Code.
  5. Add the Redirect URL below: https://teams.microsoft.com/api/platform/v1.0/oAuthRedirect
  6. Select Create credential pair

Keep this page open; you'll reference it in the next step.

Step 2: Register an OAuth Client in Microsoft

  1. Go to the Microsoft Developer Portal.
  2. Sign in with your Microsoft 365 account.
  3. In the Developer Portal, go to Tools > OAuth client registration.
  4. Select New OAuth client registration or Register client.
  5. Fill in the details below using the values from Haiilo:
    • Base URL https://<<your_haiilo_domain>>/api/mcp. Example: https://example.haiilo.app/api/mcp.
    • Client ID: The Client ID you defined in the previous step.
    • Client Secret: The Client Secret from the Haiilo credential pair.
    • Authorization Endpoint: Copy and paste from Haiilo's Administration > Integrations > MCP. Should be in this format: https://<<your_haiilo_domain>>/web/idp/realms/tenant-<<unique_id>>/protocol/openid-connect/auth
    • Token Endpoint: Copy and paste from Haiilo's Administration > Integrations > MCP. Should be in this format: https://<<your_haiilo_domain>>/web/idp/realms/tenant-<<unique_id>>/protocol/openid-connect/token
    • Refresh Endpoint: Same as Token Endpoint.
  6. For now, keep the Restrict usage by Teams app as Any Teams app. You'll change this later.
  7. Select Save.
  8. Copy the OAuth Client Registration ID to be used in Step 3.

Keep this page open; you'll return in step 6.2.

Step 3: Configure the Agent in Haiilo

  1. In Haiilo, go to Administration > Integrations > Haiilo MCP.
  2. Toggle on the MCP settings.
  3. Complete the following fields:

    Field Description
    App name The display name for your agent in Microsoft Copilot
    OAuth client registration ID The OAuth Client ID you created in Step 2
  4. Select Download manifest. A ZIP file will be downloaded containing the manifest, agent configuration, tool definitions, and app icons.

Step 4: Upload to Microsoft Admin Center

  1. Go to the Microsoft 365 Cloud Admin Center.
  2. Sign in with your Microsoft 365 tenant admin account.
  3. Go to Agents > All agents
  4. On the right end of the page, select ellipsis icon.pngAdd agent.
  5. Upload the ZIP file you downloaded in the previous step.
  6. Once uploaded, review the app details.
  7. Under Settings, configure who can install the app and select the appropriate policy template.
  8. Review the app permissions. For this integration, typically, no additional permissions are required.
  9. Select Publish or Deploy.

Step 5: Test the Agent

5.1 Install and Test

  1. In the Microsoft Admin Center, ensure the app is assigned to your user account.
  2. Open Microsoft Teams or Microsoft Copilot.
  3. Search for your agent by name.
  4. Select Add or Use this agent.
  5. Try executing an MCP tool action to verify authentication.

5.2 Publish to Your Organization

Once testing is complete:

  1. Return to the Microsoft Admin Center.
  2. Update the deployment settings to include the intended user groups or the entire organization.
  3. The agent will be automatically installed for selected users. 

Step 6: Update the OAuth client registration

6.1 Obtain the App ID from Teams

  1. Go to the Microsoft Teams Admin Center and sign in with your account.
  2. Go to Teams apps > Manage apps.
  3. Search by the agent's name and open it.
  4. Copy the App ID

6.2 Update OAuth client

  1. Return to the Microsoft Developer Portal and sign in with your account.
  2. Go to Tools > OAuth client registration.
  3. Open your newly registered OAuth client.
  4. Under Restrict usage by Teams app choose Existing Teams app.
  5. Paste the Teams app ID and save it.

Was this article helpful?

0 out of 0 found this helpful