Share via

Azure AI Foundry (new) Agent with MCP won't work with deploy to teams.

Stefan Straver 30 Reputation points
2025-12-17T13:49:29.42+00:00

Hi,

I have built a agent with a MCP server in azure foundry.
Everything works fine in the Azure AI Foundry playground.

When i publish the agent to teams/m365 copilot it gives the error:
Encountered error=Response status code does not indicate success: 400 (Bad Request).. If issue persists, please use following identifiers in any support request: ConversationId = xxxx@thread.v2, activityId = xxxxxx

It gives this error aswell in the azure bot service when i try to communicate there.

When i delete the MCP, it will work just fine.
But the MCP is correctly configured because it works in the Azure AI Foundry Playground.

Is this a bug because it is really new and still in preview?

Foundry Tools
Foundry Tools

Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform


Answer accepted by question author

Anshika Varshney 13,220 Reputation points Microsoft External Staff Moderator
2025-12-25T04:37:19.0033333+00:00

Hi Stefan Straver,

Thank you for reaching out on the Microsoft Q&A.

It looks like you're having an issue with your Azure AI Foundry agent when attempting to publish it to Teams/M365 Copilot, specifically with a 400 (Bad Request) error related to your MCP server configuration. It’s great that everything works fine in the Azure AI Foundry playground, but the problem seems to arise when you deploy it.

Here’s a couple of things you could try:

Double-check MCP Configuration: Even though it works in the playground, ensure that the MCP server is configured correctly for the Teams environment. Sometimes configurations that work in development may not translate directly to production or other environments.

Review Activity Logs: In the Azure portal, check the activity logs to see if there are more details about the 400 error. Any accompanying error messages could provide insights into what might be wrong.

Test with Basic Inputs: Try communicating with the bot using basic inputs in Teams without any complex queries to see if the issue persists. This will help determine if the problem is related to specific requests or the MCP setup itself.

Check for Known Issues: Since you mentioned that this is a new feature still in preview, it’s possible there are known issues. It might be useful to look through the Azure feedback forums or the relevant documentation for any updates or reported bugs.

  1. Use the Identifiers: When seeking further support, use the provided Conversation ID and activity Id. They help Microsoft support quickly track down the issue.

Lastly, since it's in preview, there might still be some bugs that need addressing, so keeping an eye on Azure updates or reaching out to support with specifics could be beneficial.

Please let me know if there are any remaining questions or additional details, I can help with, I’ll be glad to provide further clarification or guidance.

Reference List:

I Hope this helps. Do let me know if you have any further queries.


If this answers your query, please do click Accept Answer and Yes for was this answer helpful.

User's image

Thank you!

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. AI answer

    2025-12-17T13:49:48.94+00:00

    It seems you are encountering a 400 Bad Request error when trying to deploy your Azure AI Foundry agent with a Model Context Protocol (MCP) server to Teams and the Azure Bot Service. Since the MCP works correctly in the Azure AI Foundry Playground, the issue may be related to how the MCP is integrated with Teams or the Azure Bot Service.

    Here are some troubleshooting steps you can consider:

    1. Check MCP Configuration: Ensure that the MCP is configured correctly for use with Teams. Sometimes, specific settings or parameters may need to be adjusted for compatibility.
    2. Review Logs: Look at the logs in the Azure portal for both the Azure Bot Service and the MCP server to identify any additional error messages or warnings that could provide more context about the failure.
    3. Endpoint Validation: Ensure that the endpoint being used in the MCP is accessible and correctly formatted. The endpoint must be a full URI as per the requirements.
    4. Known Issues: Since MCP is relatively new and in preview, there may be known issues that the product team is currently addressing. It might be helpful to check the official documentation or forums for any updates on this.
    5. Support Request: If the issue persists, consider reaching out to Microsoft support with the provided ConversationId and activityId for more detailed assistance.

    Given that the MCP works in the Azure AI Foundry Playground, it does not appear to be a configuration issue with the MCP itself, but rather how it interacts with Teams and the Azure Bot Service.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.