Skip to content

Add Support for CopilotStudio Agent-to-Agent Connector for AgentsSDK to populate UserAuthorization #229

@tracyboehrer

Description

@tracyboehrer

Changes

  • New ChannelAccount Role type: "connectoruser"
  • New OAuth Hander. See DotNet Microsoft.Agents.Builder.UserAuth.Connector.ConnectorUserAuthorization
    • This does not use the Token Service
    • The OAuth token arrives in the incoming requests Bearer token
    • OBO is supported as with Token Service tokens. Note that the DotNet version, both this new handler and the token service handler share the same OBO base class.
  • New ConnectorClient. See DotNet Microsoft.Agents.Connector.MCSConnectorClient
    • All but Conversations.SendToConversation and Conversations.ReplyToActivity are stubbed out (not implemented)
    • This ConnectorClient does NOT need a bearer token
    • The ServiceUrl in the incoming request contains the token
    • Note that this ConnectorClient does NOT append the ChannelAPI paths. It uses the ServiceUrl as-is
  • ConnectorClient creation
    • If the incoming request contains activity.recipient.role == connectoruser, then create the new MCSConnectorClient.
    • See DotNet Microsoft.Agents.Builder.RestChannelServiceClientFactory.CreateConnectorClientAsync(ITurnContext, string, IList<string>, bool, CancellationToken)

Sample

  • DotNet: CopilotStudioAgentConnector
  • Note config. No real surprises except for use of new OAuth handler type ConnectorUserAuthorization

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions