Skip to content

Conversation

@aavasthy
Copy link
Contributor

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

Add AAD audience scope override functionality when this environment variable is set AADScopeOverride = "AZURE_COSMOS_AAD_SCOPE_OVERRIDE". If no environment variable is et then it uses the existing default scope value.
This will help clients in accessing applications which have a different scope.

All SDK Contribution checklist:

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.

Testing Guidelines

  • [ X] Pull request includes test coverage for the included changes.

Copilot AI review requested due to automatic review settings July 25, 2025 19:32
@aavasthy aavasthy requested a review from a team as a code owner July 25, 2025 19:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds AAD audience scope override functionality to the Azure Cosmos DB SDK, allowing clients to override the default AAD scope using the AZURE_COSMOS_AAD_SCOPE_OVERRIDE environment variable. This enables access to applications with different scope requirements.

Key changes:

  • Added environment variable constant for AAD scope override
  • Modified both sync and async connection classes to check for scope override
  • Added comprehensive test coverage for the new functionality

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
_constants.py Added new constant for the AAD scope override environment variable
_cosmos_client_connection.py Implemented scope override logic in sync connection class
_cosmos_client_connection_async.py Implemented scope override logic in async connection class
test_aad.py Added test case for scope override functionality in sync tests
test_aad_async.py Added test case for scope override functionality in async tests

@aavasthy aavasthy self-assigned this Jul 25, 2025
Copy link
Member

@tvaron3 tvaron3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks

@aavasthy aavasthy moved this to In Progress in CosmosDB Python Eco-System Jul 28, 2025
@aavasthy aavasthy merged commit 9c7455d into Azure:main Jul 28, 2025
24 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in CosmosDB Python Eco-System Jul 28, 2025
@aavasthy aavasthy mentioned this pull request Jul 29, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants