Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

[#6560] Allow TokenCredential authentication in CosmosDbPartitionedStorage - #6614

Merged
tracyboehrer merged 3 commits into
mainfrom
southworks/add/cosmosdbpartitionedstorage-tokencredential
Apr 21, 2023
Merged

[#6560] Allow TokenCredential authentication in CosmosDbPartitionedStorage#6614
tracyboehrer merged 3 commits into
mainfrom
southworks/add/cosmosdbpartitionedstorage-tokencredential

Conversation

@ceciliaavila

Copy link
Copy Markdown
Collaborator

Fixes #6560

Description

This PR adds the CosmosDB authentication method through TokenCredential in CosmosDbPartitionedStorage.

Specific Changes

  • Upgraded Microsoft.Azure.Cosmos package from 3.15.1 to 3.32.2 to get the CosmosClient constructor that uses TokenCredential.
  • Added TokenCredential property to CosmosDbPartitionedStorageOptions class.
  • Updated validation to throw if AuthKey and TokenCredential properties are null.
  • Added the alternative to create a CosmosClient using the TokenCredential if provided.

Testing

The following image shows the information saved in CosmosDB after creating the client using Azure credentials.
image

@ceciliaavila ceciliaavila added the Automation: Parity with js The PR needs to be ported to JS label Apr 4, 2023
@ceciliaavila
ceciliaavila requested a review from a team as a code owner April 4, 2023 13:10
@BruceHaley

Copy link
Copy Markdown
Contributor

✔️ No Binary Compatibility issues for Microsoft.Bot.Builder.Azure.dll

@tracyboehrer
tracyboehrer merged commit 45ee363 into main Apr 21, 2023
@tracyboehrer
tracyboehrer deleted the southworks/add/cosmosdbpartitionedstorage-tokencredential branch April 21, 2023 15:20
@coveralls

Copy link
Copy Markdown
Collaborator

Pull Request Test Coverage Report for Build 348550

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 11 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.01%) to 79.093%

Files with Coverage Reduction New Missed Lines %
/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/SetProperties.cs 5 68.75%
/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/SetProperty.cs 6 62.5%
Totals Coverage Status
Change from base Build 348552: 0.01%
Covered Lines: 25823
Relevant Lines: 32649

💛 - Coveralls

This was referenced May 14, 2026
This was referenced May 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Automation: Parity with js The PR needs to be ported to JS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow TokenCredential authentication in CosmosDbPartitionedStorage

5 participants