Details: Error: 500: => System.InvalidOperationException

Gwendolyn Denton 40 Reputation points
2025-08-26T17:57:09.49+00:00

Following this document: https://learn.microsoft.com/en-us/microsoft-copilot-studio/publication-add-bot-to-microsoft-teams

But I got the error code 500 when deploying Copilot Agents to my Teams:

image

Details: Error: 500: => System.InvalidOperationException: Sequence contains no elements at System.Linq.ThrowHelper.ThrowNoElementsException() at System.Linq.Enumerable.FirstTSource at Microsoft.SemanticKernel.Skills.OpenAPI.OpenApi.OpenApiDocumentParser.ExtractRestApiOperations(OpenApiDocument document) at Microsoft.SemanticKernel.Skills.OpenAPI.OpenApi.OpenApiDocumentParser.ParseAsync(Stream stream, Boolean ignoreNonCompliantErrors, CancellationToken cancellationToken) at Microsoft.SemanticKernel.KernelOpenApiExtensions.RegisterOpenApiSkillAsync(IKernel kernel, Stream documentStream, String skillName, OpenApiSkillExecutionParameters executionParameters, CancellationToken cancellationToken)

Any guidance ?

Microsoft Teams | Development
0 comments No comments
{count} votes

Accepted answer
  1. Teddie-D 3,920 Reputation points Microsoft External Staff Moderator
    2025-08-27T00:07:41.92+00:00

    Hi @Gwendolyn Denton 

    Thank you for posting your question in the Microsoft Q&A forum. 
    It seems like the 500 error you're encountering occurs is typically caused by incomplete bot configuration within Azure. For Copilot in Teams to function correctly, the bot must be enabled not only for the standard channels but also for the Microsoft 365 channel. We've received similar reports from other users recently, and the product team has acknowledged this as a known issue that is currently under investigation. 

    In the meantime, I recommend reviewing this guide to see if enabling the Microsoft 365 channel helps in your tenant: Extend Message Extension to Outlook - Teams | Microsoft Learn

    If the issue persists after making that adjustment, please submit a support request to the Azure Support team. Since this appears to be related to Azure-specific configuration, their team has the appropriate tools and access to investigate the matter further. While we’re here to guide you as much as possible, our capabilities as forum moderators are limited when it comes to deeper technical troubleshooting. 

    If you need help submitting a support request, this article walks you through the process: How to create an Azure support request - Azure supportability | Microsoft Learn   

    Thank you for your patience and understanding. 


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".   

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. 

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

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