We have a Microsoft Foundry agent published to Microsoft 365 Copilot / Teams. The direct Foundry Responses API works, but the published channel path fails.
Any ideas? I am confused why I cannot simply access the agent in Teams or Web 365 Co-pilot? It lets me add it, but it will not respond to prompts? I must be missing something simple. as I have never had this issue with Co-pilot Studio agents, but I am really, really struggling with MS Foundry agents. They work great the Foundry playground, but not outside of that.
Agent:
SEUS-Engineering-Knowledge
Azure Foundry account/resource:
SEUS-AIFoundry-Secure
Project:
SEUS-AI-Engineering-Knowledge
Bot Service:
seus-engineering-knowledge46829
Published agent identity / Bot ID:
61814041-916f-4281-ad51-4b866a8cf0c2
ActivityProtocol endpoint:
https://SEUS-AIFoundry-Secure.services.ai.azure.com/api/projects/SEUS-AI-Engineering-Knowledge/applications/SEUS-Engineering-Knowledge/protocols/activityprotocol?api-version=2025-11-15-preview
Responses endpoint:
https://SEUS-AIFoundry-Secure.services.ai.azure.com/api/projects/SEUS-AI-Engineering-Knowledge/applications/SEUS-Engineering-Knowledge/protocols/openai/responses?api-version=2025-11-15-preview
Known working:
- Direct /protocols/openai/responses call returns a valid agent response.
- Azure Bot Service Direct Line conversation can be created.
- Direct Line messages reach the bot.
- The bot returns a Foundry sign-in card, proving Bot Service reaches the ActivityProtocol endpoint.
Known fixed/verified:
- Azure AI Studio App Enterprise Application/service principal now exists:
appId: cb2ff863-7f30-4ced-ab89-a00194bcf6d9
objectId: 4badc553-5a20-461d-8c0a-a5929514ea08
accountEnabled: true
appRoleAssignmentRequired: false
- Azure AI Studio App reply URLs include:
https://api.agent-oauth.azureml.ms/agent-oauth/v1.0/redirect
- DA user has Azure AI User on the Foundry project scope.
- DA user has Azure AI User on the parent Foundry account scope.
- Published agent identity has Azure AI User on project scope and parent Foundry account scope.
Entra sign-in logs:
Application:
Azure AI Studio App
App ID:
cb2ff863-7f30-4ced-ab89-a00194bcf6d9
User:
******@screen-spe.com
Result:
conditionalAccessStatus: success
status.errorCode: 0
authenticationDetails.succeeded: true
token binding satisfied: true
resourceDisplayName: Azure Resource Manager
resourceId: 797f4846-ba00-4fd7-ba43-dac1f8f63013
Failure:
After successful Entra sign-in, Foundry OAuth redirect fails and the bot remains stuck at:
"Waiting for Foundry login to complete"
Browser/OAuth error:
OAuth redirection processing failed. Please re-login.
Request: GET eastus2.api.azureml.ms/agent-oauth/v1.0/redirect
Status Code: 400 BadRequest
Error Code: UserError
Reason Phrase: Authentication code has already been redeemed. Please re-login.
componentName: agent-asset
Latest correlation:
operation: b9ff10976712502fa69c81da69f63b13
request: c8d783d9a48da550
nested request: 2b4bc2c0b3fd94c2
environment: westus / eastus2
statusCode: 400
Impact:
The agent works via direct Foundry Responses API but cannot complete the published ActivityProtocol OAuth flow used by Teams/Microsoft 365 Copilot. Microsoft 365 Copilot shows the agent but it cannot answer.