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
- "Manage API clients" and "Manage integrations" permissions in your Haiilo platform.
- Administrator access to Microsoft 365 Cloud Admin Center.
- Administrator access to Microsoft Teams Admin Center.
- Access to Microsoft Developer Portal.
- A Microsoft 365 tenant.
Step 1: Create an API Client in Haiilo
- In Haiilo, go to Administration > API clients.
- Select Create credential pair.
- Enter a suitable Client ID like "Haiilo-MCP".
- Under Grant Types, check Authorization Code.
- Add the Redirect URL below:
https://teams.microsoft.com/api/platform/v1.0/oAuthRedirect - Select Create credential pair
Keep this page open; you'll reference it in the next step.
Step 2: Register an OAuth Client in Microsoft
- Go to the Microsoft Developer Portal.
- Sign in with your Microsoft 365 account.
- In the Developer Portal, go to Tools > OAuth client registration.
- Select New OAuth client registration or Register client.
- 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.
-
Base URL
- For now, keep the Restrict usage by Teams app as Any Teams app. You'll change this later.
- Select Save.
- 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
- In Haiilo, go to Administration > Integrations > Haiilo MCP.
- Toggle on the MCP settings.
-
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 - 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
- Go to the Microsoft 365 Cloud Admin Center.
- Sign in with your Microsoft 365 tenant admin account.
- Go to Agents > All agents
- On the right end of the page, select
> Add agent.
- Upload the ZIP file you downloaded in the previous step.
- Once uploaded, review the app details.
- Under Settings, configure who can install the app and select the appropriate policy template.
- Review the app permissions. For this integration, typically, no additional permissions are required.
- Select Publish or Deploy.
Step 5: Test the Agent
5.1 Install and Test
- In the Microsoft Admin Center, ensure the app is assigned to your user account.
- Open Microsoft Teams or Microsoft Copilot.
- Search for your agent by name.
- Select Add or Use this agent.
- Try executing an MCP tool action to verify authentication.
5.2 Publish to Your Organization
Once testing is complete:
- Return to the Microsoft Admin Center.
- Update the deployment settings to include the intended user groups or the entire organization.
- The agent will be automatically installed for selected users.
Step 6: Update the OAuth client registration
6.1 Obtain the App ID from Teams
- Go to the Microsoft Teams Admin Center and sign in with your account.
- Go to Teams apps > Manage apps.
- Search by the agent's name and open it.
- Copy the App ID.
6.2 Update OAuth client
- Return to the Microsoft Developer Portal and sign in with your account.
- Go to Tools > OAuth client registration.
- Open your newly registered OAuth client.
- Under Restrict usage by Teams app choose Existing Teams app.
- Paste the Teams app ID and save it.