Skip to content

Users/axsuarez/teams sample revision#81

Merged
axelsrz merged 3 commits intomainfrom
users/axsuarez/teams-sample-revision
Aug 4, 2025
Merged

Users/axsuarez/teams sample revision#81
axelsrz merged 3 commits intomainfrom
users/axsuarez/teams-sample-revision

Conversation

@axelsrz
Copy link
Member

@axelsrz axelsrz commented Aug 4, 2025

This pull request introduces significant updates to authentication and configuration handling across multiple files in the Teams Agent sample application. The changes improve token acquisition error handling, streamline environment variable usage, and enhance the structure of authentication and authorization components.

Authentication Enhancements:

Configuration Updates:

  • test_samples/teams_agent/config.py: Updated the DefaultConfig class to use AgentAuthConfiguration instead of MsalAuthConfiguration and revised environment variable keys for better alignment with the SDK structure.
  • test_samples/teams_agent/env.TEMPLATE: Refactored environment variable names to match the updated configuration structure and added placeholders for tenant ID, client ID, client secret, and connection name.

Codebase Simplification:

  • test_samples/teams_agent/app.py: Refactored imports, removed redundant DefaultConnection and RestChannelServiceClientFactory, and introduced MsalConnectionManager and Authorization for cleaner authentication handling. Updated create_agent to pass STORAGE explicitly to TeamsSso. [1] [2]
  • test_samples/teams_agent/teams_sso.py: Modified the TeamsSso class to accept Storage as a parameter and updated OAuthFlow initialization to use Storage instead of UserState. [1] [2]

@axelsrz axelsrz merged commit 2885da5 into main Aug 4, 2025
5 checks passed
@axelsrz axelsrz deleted the users/axsuarez/teams-sample-revision branch August 4, 2025 18:53
rodrigobr-msft pushed a commit that referenced this pull request Aug 4, 2025
* Teams sample updates

* Teams sample updates

* Teams sample updates
kylerohnmsft pushed a commit to claire-cho-msft/Agents-for-claire that referenced this pull request Aug 6, 2025
* Teams sample updates

* Teams sample updates

* Teams sample updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments