Removing BasicCard, MediaType, ClaimsIdentity.is_authenticated - #603
Merged
Rodrigo Brandão (rodrigobr-msft) merged 6 commits intoSep 25, 2026
Merged
Conversation
Rodrigo Brandão (rodrigobr-msft)
marked this pull request as ready for review
September 24, 2026 23:10
Rodrigo Brandão (rodrigobr-msft)
requested a review
from a team
as a code owner
September 24, 2026 23:10
Copilot started reviewing on behalf of
Rodrigo Brandão (rodrigobr-msft)
September 24, 2026 23:11
View session
BasicCard, MediaType, ClaimsIdentity.is_authenticated, and creation of UserTokenClient without an app ID
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Remaining references, incompatible constructor call sites, and the broken anonymous token-client path cause runtime and test failures.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 4
Open (7)
Remove stale MediaCard exports and test references · New Migrate ClaimsIdentity callers after positional parameter removal · New Preserve anonymous adapter flow with empty app IDs · New Construct anonymous ClaimsIdentity without obsolete argument · New Remove unused deprecated import · New Remove unused warnings import · New Rename test class to reflect remaining BasicCard coverage · New
What changed in this PR
Removes deprecated card, identity, configuration, and token-client compatibility APIs.
Changes:
- Deletes
BasicCard,MediaCard, and related exports/tests. - Removes deprecated
ClaimsIdentity.is_authenticatedsupport. - Removes legacy helpers and requires
UserTokenClient.app_id.
| File | Description |
|---|---|
tests/activity/test_card_builders.py |
Removes BasicCard coverage. |
test_samples/app_style/echo_proactive_agent.py |
Removes persisted authentication state. |
libraries/.../user_token_client.py |
Makes app ID mandatory. |
libraries/.../card_factory.py |
Removes the content-types alias. |
libraries/.../claims_identity.py |
Removes is_authenticated. |
libraries/.../agent_application.py |
Removes legacy environment parsing. |
libraries/.../media_card.py |
Deletes MediaCard. |
libraries/.../basic_card.py |
Deletes BasicCard. |
libraries/.../activity/__init__.py |
Removes card imports and exports. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
BasicCard, MediaType, ClaimsIdentity.is_authenticated, and creation of UserTokenClient without an app IDBasicCard, MediaType, ClaimsIdentity.is_authenticated
Copilot started reviewing on behalf of
Rodrigo Brandão (rodrigobr-msft)
September 25, 2026 17:09
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Remaining positional identity calls are now misbound, and removed deprecated code leaves unused imports that fail linting.
Review effort: Balanced
Findings: None
Resolved since last review (7)
Construct anonymous ClaimsIdentity without obsolete argument Preserve anonymous adapter flow with empty app IDs Migrate ClaimsIdentity callers after positional parameter removal Remove stale MediaCard exports and test references Rename test class to reflect remaining BasicCard coverage Remove unused warnings import Remove unused deprecated import
Kyle Rohn (kylerohn-msft)
approved these changes
Sep 25, 2026
Rodrigo Brandão (rodrigobr-msft)
deleted the
users/robrandao/obsolete-sweep
branch
September 25, 2026 18:33
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.


This pull request removes deprecated card types and related code from the
microsoft_agents.activitylibrary, and cleans up deprecated authentication logic in theClaimsIdentityclass and related usages. It also updates tests and sample code to reflect these removals. The changes simplify the codebase by eliminating obsolete features, reducing maintenance overhead, and clarifying the supported API surface.Removal of deprecated card types and related code:
BasicCardandMediaCardclasses and all their imports/exports from themicrosoft_agents.activitypackage. This includes deleting their source files and removing them from the module's__init__.pyand test imports. ([[1]](https://github.com/microsoft/Agents-for-python/pull/603/files#diff-31cb72ea23ff32a2ccb5b68267163cf524218b1630beaa35e920da3b11b69eaaL20),[[2]](https://github.com/microsoft/Agents-for-python/pull/603/files#diff-31cb72ea23ff32a2ccb5b68267163cf524218b1630beaa35e920da3b11b69eaaL60),[[3]](https://github.com/microsoft/Agents-for-python/pull/603/files#diff-31cb72ea23ff32a2ccb5b68267163cf524218b1630beaa35e920da3b11b69eaaL130),[[4]](https://github.com/microsoft/Agents-for-python/pull/603/files#diff-31cb72ea23ff32a2ccb5b68267163cf524218b1630beaa35e920da3b11b69eaaL161),[[5]](https://github.com/microsoft/Agents-for-python/pull/603/files#diff-a4b25422e112e3736c0c8ce6f3ff10765e9d23ddd3533ded868603ed82c7b2c4L1-L137),[[6]](https://github.com/microsoft/Agents-for-python/pull/603/files#diff-90c33efbe60320a4e3b60dbc5e50c5f8634e08eaf60fbf7d5d7d2a2cbd82f400L1-L117),[[7]](https://github.com/microsoft/Agents-for-python/pull/603/files#diff-8805296e5f3dc1eaf773f05f5668498d8f70fde724e834607c6893f900d62e1eL9-L15),[[8]](https://github.com/microsoft/Agents-for-python/pull/603/files#diff-8805296e5f3dc1eaf773f05f5668498d8f70fde724e834607c6893f900d62e1eL57-R62),[[9]](https://github.com/microsoft/Agents-for-python/pull/603/files#diff-8805296e5f3dc1eaf773f05f5668498d8f70fde724e834607c6893f900d62e1eL92-L95))BasicCardorMediaCard, focusing tests on supported card types only. ([[1]](https://github.com/microsoft/Agents-for-python/pull/603/files#diff-8805296e5f3dc1eaf773f05f5668498d8f70fde724e834607c6893f900d62e1eL57-R62),[[2]](https://github.com/microsoft/Agents-for-python/pull/603/files#diff-8805296e5f3dc1eaf773f05f5668498d8f70fde724e834607c6893f900d62e1eL92-L95))Authentication and identity cleanup:
is_authenticatedlogic from theClaimsIdentityclass, including constructor parameters, properties, and warnings. All usages ofis_authenticatedin the codebase and tests have been removed or updated. ([[1]](https://github.com/microsoft/Agents-for-python/pull/603/files#diff-f3ad7cc4c139eca4411fa8e119260af6d21980893c040c0fd967b41c832f1ceaL19-L47),[[2]](https://github.com/microsoft/Agents-for-python/pull/603/files#diff-f3ad7cc4c139eca4411fa8e119260af6d21980893c040c0fd967b41c832f1ceaL65-L83),[[3]](https://github.com/microsoft/Agents-for-python/pull/603/files#diff-e111c36bbe05a7db21863f1b011f1e952e89d901de5bee93d2ff5f8b4e180b82L107-R107),[[4]](https://github.com/microsoft/Agents-for-python/pull/603/files#diff-2ce8f71e1b0b200291cc7bd1ea89987c6e1fa85023a3e9905f6d1a3c24bda256L65),[[5]](https://github.com/microsoft/Agents-for-python/pull/603/files#diff-2ce8f71e1b0b200291cc7bd1ea89987c6e1fa85023a3e9905f6d1a3c24bda256L83-L98),[[6]](https://github.com/microsoft/Agents-for-python/pull/603/files#diff-2ce8f71e1b0b200291cc7bd1ea89987c6e1fa85023a3e9905f6d1a3c24bda256L116),[[7]](https://github.com/microsoft/Agents-for-python/pull/603/files#diff-f4344ed30f62bfa2f55521b9462bd17cc7cf1158580a72bd695cfac8d4c4f51aL79-R79),[[8]](https://github.com/microsoft/Agents-for-python/pull/603/files#diff-4f32020d5d0e459579ab343c1763a7e335e7cf06dc28989a1d2291d929562e5eL57-R60))ClaimsIdentityin tests and sample code to remove theis_authenticatedparameter and, where appropriate, set theauthentication_typeexplicitly. ([[1]](https://github.com/microsoft/Agents-for-python/pull/603/files#diff-e111c36bbe05a7db21863f1b011f1e952e89d901de5bee93d2ff5f8b4e180b82L107-R107),[[2]](https://github.com/microsoft/Agents-for-python/pull/603/files#diff-f4344ed30f62bfa2f55521b9462bd17cc7cf1158580a72bd695cfac8d4c4f51aL79-R79),[[3]](https://github.com/microsoft/Agents-for-python/pull/603/files#diff-4f32020d5d0e459579ab343c1763a7e335e7cf06dc28989a1d2291d929562e5eL57-R60))General codebase cleanup:
parse_env_vars_configurationstatic method fromAgentApplication, as configuration loading should use the recommended alternative. ([libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/app/agent_application.pyL902-L934](https://github.com/microsoft/Agents-for-python/pull/603/files#diff-a0c0028a01efc798e89b84f1bca0d4323b71753bd6f43d02800f29e66bc766a6L902-L934))ContentTypesincard_factory.py. ([libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/card_factory.pyL163-L165](https://github.com/microsoft/Agents-for-python/pull/603/files#diff-57847651a925caedb3a1eb0f850619cc63d00dc4110e7aac963779fa9b1c1909L163-L165))These changes help keep the library up-to-date, reduce confusion for users, and make the codebase easier to maintain.