You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor connection and authentication configuration around a shared Configuration instance, reducing dictionary unpacking and separating provider-specific settings from legacy authentication configuration.
Changes
Add Configuration-based initialization to connection managers and authorization.
Introduce MsalConnectionSettings and migrate Sidecar settings to the shared ConnectionSettingsBase.
Consolidate shared connection APIs under authorization.connections.
Support typed audience/service-URL routing maps using lists or named mappings.
Update environment loading to return Configuration, accept defaults, and preserve custom sections.
Preserve issuer and audience settings during legacy conversion, normalize scope inputs, and improve configuration logging/redaction.
Use application-scoped JWT validator caching in FastAPI.
Migrate samples to pass configuration directly through authentication and hosting, using typed getters instead of raw dictionary access.
Expand regression coverage and narrowly filter expected legacy deprecation warnings while retaining warnings-as-errors.
Compatibility and migration
Retain deprecated AgentAuthConfiguration inputs, legacy connection-manager constructor inputs, and existing public import paths.
Prefer config=configuration and provider .config over deprecated configuration accessors.
Environment loading no longer synthesizes missing standard sections.
Validation
60 targeted sample, middleware, and OTel sampler tests passed.
Syntax validation passed for all 59 changed sample modules.
No new flake8 diagnostics compared with the baseline.
Live authentication and external services were not exercised.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Directly constructing SidecarConnectionSettings with the string "false" can disable network restrictions and allow public hosts, while legacy API compatibility and configuration-validation regressions also remain unresolved.
This PR refactors connection configuration across the Microsoft 365 Agents SDK for Python, introducing typed provider settings and shared configuration binding for authentication, routing, and samples.
Changes:
Consolidates connection APIs under authorization.connections and adds typed MSAL and Entra sidecar settings.
Updates environment loading, OAuth configuration binding, and FastAPI validator caching.
Migrates samples and expands tests for configuration aliases, routing, credential redaction, and legacy compatibility.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
String-valued sidecar flags such as "false" now bypass public-host restrictions, while unresolved compatibility regressions break existing configuration and authentication calls.
The previous lookup used or {}, so an explicit HANDLERS: None or an empty AGENTAPPLICATION__USERAUTHORIZATION__HANDLERS environment value meant no configured handlers. Configuration.get() only applies its default to missing keys, so these existing inputs now reach .items() as None or an empty string and crash Authorization construction. Restore the empty/unset fallback before iterating.
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
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.
Summary
Refactor connection and authentication configuration around a shared
Configurationinstance, reducing dictionary unpacking and separating provider-specific settings from legacy authentication configuration.Changes
Configuration-based initialization to connection managers and authorization.MsalConnectionSettingsand migrate Sidecar settings to the sharedConnectionSettingsBase.authorization.connections.Configuration, accept defaults, and preserve custom sections.Compatibility and migration
AgentAuthConfigurationinputs, legacy connection-manager constructor inputs, and existing public import paths.config=configurationand provider.configover deprecated configuration accessors.Validation