Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates

Connecting Microsoft 365 Copilot to Qlik's MCP Server with the Agents Toolkit

cancel
Showing results for 
Search instead for 
Did you mean: 
banderson735
Employee
Employee

Connecting Microsoft 365 Copilot to Qlik's MCP Server with the Agents Toolkit

Last Update:

Aug 3, 2026 3:12:41 PM

Updated By:

banderson735

Created date:

Apr 8, 2026 11:36:14 AM

This article will walk you through how to create a declarative agent for Copilot that uses an MCP plugin to connect MSFT 365 Copilot with Qlik’s MCP Server. Please note that several prerequisites must be met to execute the steps in this guide successfully.

banderson735_0-1775610432217.png

Prerequisites

Create the Agent

  1. Open Visual Studio Code and select the Microsoft 365 Agents Toolkit icon in the left-hand Activity Bar.

banderson735_1-1775610432225.png

 

  1. Select Create a New Agent/App in the Agents Toolkit task pane.
  2. Select Declarative Agent.
  3. Select Add an Action, then select Start with an MCP Server.
  4. Enter your tenant’s MCP server URL: https://<your tenant URL>/api/ai/mcp
  5. Choose a location for the agent project.
  6. Enter a name for the agent.

Once you complete these steps, Agents Toolkit generates the required files for the agent and opens a new Visual Studio Code window with the agent project loaded.

Register an OAuth App with Your Tenant

  1. In your browser, navigate to your tenant.
  2. Navigate to the Administrative Activity Center > OAuth.

banderson735_2-1775610432226.png

 

  1. Create a new client with the following configuration.

http://127.0.0.1:33418, http://127.0.0.1:33418/, and https://vscode.dev/redirect are redirect URLs for VS Code used for development and testing. https://teams.microsoft.com/api/platform/v1.0/oAuthRedirect will be the redirect URL when the plugin is provisioned and deployed.

  1. Create the client configuration and make sure to save the Client ID and Client Secret in a secure location, as we will need to use that information throughout setup.

Add Tools from the MCP Server

  1. Within VS Code, open the .vscode/mcp.json file. Select the Start button in the file editor.

banderson735_3-1775610432229.png

 

  1. You will receive a message saying Dynamic Client Registration not supported. Click Copy URIs & Proceed.
  2. Add your Client ID and Client Secret that you copied from the Qlik OAuth step.
  3. You will be prompted to authenticate, click Allow.
  4. You will be prompted to open an external website, click Open.
  5. You should be redirected to Qlik’s OAuth approval page, click Approve to authorize your agent to access your Qlik MCP Server.
  6. Within VS Code and in the mcp.json file, select the ATK: Fetch action from MCP button in the file editor, then select ai-plugin.json.

banderson735_4-1775610432233.png

 

  1. Select which tools you would like the agent, and ultimately a user, to have access to. If desired, you can choose all tools.
  2. Select OAuth (with static registration) as the authentication type.

Provision the Agent and Test in Copilot

  1. In Visual Studio Code, select the Microsoft 365 Agents Toolkit icon in the left-hand Activity Bar.
  2. In the Accounts pane, select Sign in to Microsoft 365. (If you’re already signed in, continue to the next step.)
  3. Confirm that both Custom App Upload Enabled and Copilot Access Enabled display under your Microsoft 365 account. If they don’t, check with your organization admin.
  4. In the Lifecycle pane, select Provision.
  5. When asked to Enter client id for OAuth registration…, enter your client ID.
  6. When asked to Enter client secret for OAuth registration…, enter your client secret.
  7. When asked for scopes enter user_default,mcp:execute and press Enter to continue.
  8. Read the message in the dialog and select Confirm to continue.
  9. Wait for the toolkit to report that provisioning finished. NOTE: provisioning might fail initially but often works after retrying.
  10. Your agent should now be available to test within Copilot. Please note that the agent will only be available to you as the owner. To share the agent with others, please see the next section.

Deploying and Publishing

Once you are ready to publish (share your agent with others), follow these steps (please see the reference link below for more detailed information from Microsoft).

  1. In Visual Studio Code, select the Microsoft 365 Agents Toolkit icon in the left-hand Activity Bar.
  2. In the Lifecycle section, click on Publish to Organization, which will trigger a publication request that your Microsoft 365 or Teams Administrator must approve
  3. Within the Teams Administrative Center, your Microsoft 365 or Teams Administrator will need to approve the pending request generated by clicking the publish to organization button in the agents toolkit. Please reference Microsoft's guidance below for more information on this process.

Please reference Microsoft’s official guidance for more information on Publishing agents for Microsoft 365 Copilot.

Considerations

  • Declarative agents are limited to 4,096 tokens of shared context, so keep each agent focused on a single purpose. For example, create one agent scoped to read-only analytical queries and another scoped to development tasks like building scripts, sheets, and charts.
  • Follow Microsoft’s guidance on writing effective agent instructions, but keep in mind the instructions count against the response token limit.
  • For cases where greater control over orchestration, underlying models, and token utilization is needed, please see Microsoft’s guidance on custom engine agents.
  • Since you configure which MCP tools are made available within your agent, you will need to update and re-publish your agent anytime you want to add a new tool to the agent.

Demo Video

References

Labels (2)
Comments
steveshaw
Partner - Contributor III
Partner - Contributor III

Thanks for this. 

DominiqueHoremans
Contributor III
Contributor III

Hi Steve,

I am getting the following error when authenticating in VSC and cannot re enter the client id: "

{"errors":[{"title":"Invalid client_id","detail":"OAuth client is not authorized","code":"OAUTH-14","status":"400"}],"traceId":"4b975dc8182b0129faaa0552409c6744"}

any idea on how I can re enter the client id? I have created a new OAuth connection in Qlik and a new project in VSC but it still gives me te error.

thank you,

Dominique 

banderson735
Employee
Employee

@DominiqueHoremans - 

That error seems like a scope or permission issue. Please confirm that the OAuth Client has the user_default and mcp:execute scopes and that your user has the MCP permission. 

 

 

DominiqueHoremans
Contributor III
Contributor III

@banderson735 the OAuth Client has the user_default and mcp:execute scopes, but I needed to add a new permission for the user. With the new permission for the user, it still gives the same error.

banderson735
Employee
Employee

@DominiqueHoremans - 

Can you please outline the steps that you're taking and provide screenshots (do not include private or sensitive data)? I'm not able to replicate this error, so I need a better understanding of your configuration steps to try to reproduce and troubleshoot your issue.

DominiqueHoremans
Contributor III
Contributor III

@banderson735 I have noticed that, even though I followed all step in Qlik Admin Center, the endpoint does not exist. 

{
  "error": "no such route",
  "message": "The requested API endpoint does not exist."
}

So, I logged a case to see if there is something else wrong.

tkodama
Partner Ambassador
Partner Ambassador

In this demo video, Copilot Chat accesses Qlik via an MCP server. With a similar configuration, is it also possible to access Qlik via an MCP server from the Copilot Cowork interface?
The reason for this is that our clients are currently utilizing the Copilot Work interface instead of Copilot Chat.

 

cka
Contributor II
Contributor II

Hi @banderson735 ,

Thank you for this article! We implemented the integration between Microsoft 365 Copilot and Qlik's MCP Server by following your guide step by step, and the setup works as described: the connection is established, the declarative agent can access our Qlik apps, and responses are generated.

However, we've noticed that the quality of Copilot's responses is significantly lower than what we get with:

  • Claude (connected to the same Qlik MCP Server)
  • Qlik Answers

Copilot's answers are often less accurate, less structured, and sometimes incomplete — even though the underlying data source and MCP tools are identical.

Our questions

Could you please advise on:

  • Best practices to improve answer quality in Copilot via MCP
  • Recommended prompting techniques or agent instructions (beyond Microsoft's general guidance)
  • Known limitations of Copilot with MCP — could the 4,096-token shared context limit mentioned in your Considerations section explain this gap?
  • Configuration adjustments worth trying (e.g., would a custom engine agent give better results?)
  • Any upcoming enhancements or roadmap items for this integration

Thanks in advance for your support!

Best regards

Version history
Last update:
Monday
Updated by: