Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform
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!