Azure AI Foundry – “Waiting for Foundry login to complete” when using custom Teams agent

Shital Kuyate 50 Reputation points
2026-02-27T12:33:49.0066667+00:00

Hello Team,

I am facing an issue while integrating a custom AI agent (built using Azure AI Foundry) with Microsoft Teams.

When I open the agent inside Teams and asking "Hi" or anything , it displays the following message and remains stuck indefinitely:

“Waiting for Foundry login to complete”

The login process never finishes and the agent does not respond.

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
SRILAKSHMI C 19,735 Reputation points Microsoft External Staff Moderator
2026-03-10T10:53:46.53+00:00

Hello Shital Kuyate,

Welcome to Microsoft Q&A and Thank you for reaching out.

Based on your description, it appears that Microsoft Teams is loading the custom agent but the Azure AI Foundry authentication process is not completing, which causes the message “Waiting for Foundry login to complete” to remain indefinitely. This usually indicates that the sign-in or token exchange between Microsoft Teams and Azure AI Foundry has not successfully finished.

Below are several checks that may help resolve the issue:

Verify the Azure AI resource and permissions Ensure that you have an Azure AI / Azure OpenAI resource configured for your agent. Also confirm that your user account or the identity used by the Teams application has the required permissions. Common roles include Owner, Contributor, Azure AI Developer, Azure AI User, or Project Manager. These permissions are managed through Microsoft Entra ID.

Confirm tenant and subscription selection during login When the Foundry login prompt appears, make sure the correct Azure tenant and subscription are selected. If the authentication occurs under the wrong directory or subscription, the agent workspace cannot be initialized and the login process may remain stuck.

Check Teams app and authentication configuration If you are using a custom Teams app, verify that the Teams app manifest contains the correct bot/app ID and that it matches the configuration used for the agent in Foundry. Also confirm that redirect URIs and permissions in Entra ID are correctly configured for the application.

Validate network and security restrictions If your environment uses firewalls, private endpoints, or proxies, ensure they are not blocking required endpoints such as:

ai.azure.com

openai.azure.com

*.services.ai.azure.com

If you are using Key Vault or restricted networking for credentials, confirm the calling identity has appropriate access permissions.

Test the Foundry login outside Teams Try signing in directly to the Foundry portal at https://ai.azure.com using the same account and open or create an agent there. If the agent works in the portal but not in Teams, this usually indicates the issue is specific to the Teams integration or SSO configuration.

Check for blocked login pop-ups or cookies Authentication may fail if pop-ups or third-party cookies are blocked. Ensure your browser allows pop-ups and cookies for ai.azure.com.

Clear client cache or try another client Sometimes the issue can be caused by a cached authentication state. You can try:

  • Clearing the Teams desktop cache
  • Signing out and signing back in
  • Testing the agent in the Teams web client

Please refer this

Resolve issues with logging in to Azure AI Foundry: https://learn.microsoft.com/azure/ai-studio/concepts/ai-resources#hubs https://learn.microsoft.com/azure/ai-studio/concepts/rbac-ai-studio

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

Thank you!

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Holt, Conner 0 Reputation points
    2026-06-05T15:17:59.4066667+00:00

    After publishing from the Foundry portal, the publish flow auto-creates an Azure Bot Service but doesn't tell you there's a mandatory manual step to complete it.

    Fix:

    1. Azure Portal → find the Bot Service resource created by the publish flow
    2. Channels → Microsoft Teams
    3. Accept the Terms of Service
    4. Hit Publish, then Apply

    Was this answer helpful?

    0 comments No comments

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.