fix: Enable ActivityProtocol on newly created Foundry ChatAgent so it can be called from Copilot Studio - #78
Merged
Yamini Dhiman (Yamini1-Microsoft) merged 1 commit intoAug 7, 2026
Conversation
Jordan Bean (jordanbean-msft)
had a problem deploying
to
production
July 31, 2026 20:18 — with
GitHub Actions
Failure
Contributor
Author
|
Seth Steenken (@sethsteenken) as discussed |
Copilot started reviewing on behalf of
Jordan Bean (jordanbean-msft)
July 31, 2026 20:19
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the AI Foundry agent provisioning step to ensure newly created agents have the Activity protocol (and related endpoint authorization configuration) enabled, making the agent callable from Microsoft Copilot Studio.
Changes:
- Adds an
enable_activity_protocol()helper infoundry/agent_api.pythat patches the agent endpoint protocol/authorization configuration via REST. - Calls
enable_activity_protocol()fromsetup_agent()after agent creation to ensure the endpoint is configured immediately. - Minor readability/formatting refactors in
step_agent_setup.pyandcreate_kb_mcp_connection().
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| infra/scripts/foundry/step_agent_setup.py | Invokes the new endpoint-configuration step after creating the agent. |
| infra/scripts/foundry/agent_api.py | Introduces REST-based endpoint patching to enable Activity protocol + auth schemes (and minor formatting tweaks). |
Contributor
Hi Jordan Bean (@jordanbean-msft) Seth Steenken (@sethsteenken) We are currently validating the changes and will update you shortly. |
Avijit-Microsoft
approved these changes
Aug 7, 2026
Yamini Dhiman (Yamini1-Microsoft)
merged commit Aug 7, 2026
bf507b3
into
microsoft:main
3 of 4 checks passed
Jordan Bean (jordanbean-msft)
deleted the
jordanbean-msft/foundry-agent-activityprotocol
branch
August 10, 2026 13:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This pull request enhances the agent setup process in the AI Foundry infrastructure scripts by adding support for enabling the Activity protocol and required authorization schemes on agent endpoints. This makes the agents compatible with Microsoft Copilot Studio and improves integration flexibility. The changes are primarily focused on protocol enablement, code organization, and minor refactoring for readability.
This is required to allow Copilot Studio to call the Foundry Agent since newly created Agents do not enable the ActivityProtocol by default in Foundry.
Otherwise, you get a "400 Agent ChatAgent endpoint does not support activity. Please update the agent endpoint to support this protocol." error when you try to call the ChatAgent from the Copilot Studio agent.
Agent protocol and authorization enhancements:
enable_activity_protocolinagent_api.pyto configure the Activity and Responses protocols, as well as required authorization schemes, for an agent endpoint. This allows Microsoft Copilot Studio to communicate with the agent using the Activity protocol.step_agent_setup.pyto callenable_activity_protocolafter creating the agent and MCP connection, ensuring endpoints are properly configured.agent_api.pyto document the new protocol and authorization enablement step.Code organization and refactoring:
enable_activity_protocolinstep_agent_setup.pyto make the new protocol configuration function available.step_agent_setup.pyfor better readability.create_kb_mcp_connectionfor better readability.Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the ChatAgent gets correctly created in Foundry & that you can call it from Copilot Studio without receiving a "400 Agent ChatAgent endpoint does not support activity. Please update the agent endpoint to support this protocol."
Other Information
I used the REST API directly for enabling the ActivityProtocol since using the Python SDK would require incrementing the pinned version of
azure-ai-projectsfrom2.1.0to2.3.0.https://learn.microsoft.com/en-us/azure/foundry/agents/how-to/configure-agent?tabs=rest#enable-protocols-and-authorization-schemes