Skip to content

[Bug]: C# - TeamsAttachmentDownloader needs updated getAccessToken #1182

@corinagum

Description

@corinagum

Language

Javascript/Typescript

Version

latest

Description

Related to #1154.

In TeamsAttachmentDownloader, getAccessToken is hardcoded to encode the bot app id. However, this means that any app using a certificate will not work. We need to adjust the logic to support (e.g.) certificate-based authentication. Botbuilder already has methods that support fetching tokens, and that should be used instead. Furthermore, non-public Azure cloud scenarios will not work with getAccessToken because the method is using the hardcoded public url.

https://github.com/microsoft/teams-ai/blob/8258ca0e2396c3f5bb376cdc62374b5cd11b5603/js/packages/teams-ai/src/TeamsAttachmentDownloader.ts#L113-L128

  • Use botbuilder's access token fetcher (lookup name of class) instead of this project's getAccessToken.
  • Support all Azure clouds (US Gov, DoD, etc.)

Reproduction Steps

N/A (internally filed)

Metadata

Metadata

Assignees

Labels

P0bugSomething isn't workingdotnetChange/fix applies to dotnet. If all three, use the 'JS & dotnet & Python' labelparityJS → dotnet and/or JS → Python

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions