Enhance PABot with dual OAuth and CompatTeamsInfo integration#417
Open
Enhance PABot with dual OAuth and CompatTeamsInfo integration#417
Conversation
Features added: - Dual OAuth authentication: Sequential authentication with two connections (graph and graph-2) - Connection names configurable via launchSettings.json - Both connections authenticated one after another before proceeding - Logout clears both OAuth connections - CompatTeamsInfo integration: - Added /member-info command using CompatTeamsInfo.GetMemberAsync - Added /team-info command using CompatTeamsInfo.GetTeamDetailsAsync - Enhanced OnMembersAddedAsync to log detailed member info on join - Help command: - Added /help command with comprehensive bot documentation - Lists all commands, authentication features, and usage instructions - Updated welcome message to include /help - Dialog improvements: - MainDialog now supports two OAuth prompts (FirstOAuthPrompt, SecondOAuthPrompt) - Six-step waterfall dialog for sequential authentication - Both tokens stored and displayed when requested - Custom logout handler signs out from both connections Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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.
Summary
This PR enhances the PABot sample with dual OAuth authentication and CompatTeamsInfo integration, demonstrating advanced Teams bot capabilities.
Changes
Dual OAuth Authentication
graphandgraph-2)launchSettings.json(ConnectionNameandSecondConnectionName)CompatTeamsInfo Integration
/member-infocommand: UsesCompatTeamsInfo.GetMemberAsyncto retrieve and display:/team-infocommand: UsesCompatTeamsInfo.GetTeamDetailsAsyncto display:OnMembersAddedAsync: Logs detailed member information when users join usingGetMemberAsyncUser Experience Improvements
/helpcommand: Comprehensive help showing:/helpTesting
The bot can be tested by:
/help,/member-info,/team-info,/create-conversationTechnical Details
Files Modified:
core/samples/PABot/Bots/TeamsBot.cs- Added commands and CompatTeamsInfo usagecore/samples/PABot/Dialogs/MainDialog.cs- Dual OAuth dialog flow and custom logoutcore/samples/PABot/Program.cs- Switched to TeamsBot (from EchoBot)core/samples/PABot/Properties/launchSettings.json- AddedSecondConnectionNameenvironment variable🤖 Generated with Claude Code