Skip to content

Region configured (None) != region detected #40197

Closed
@sandernaus

Description

@sandernaus
  • azure-identity:
  • 1.21.0:
  • Linux (Azure Function App):
  • Python 3.10:

Describe the bug
Using the azure-identity package to retrieve a token for different services (e.g. Graph) results in a warning: Region configured (None) != region detected

This is caused by the latest release of the MSAL Python Package (1.32.0).

Forcing to use an older version (e.g. 1.31.0) of the MSAL package in the Azure Function requirements.txt can be used as a workaround.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy Python code to fetch a token to Azure Function App
  2. Run the function
  3. Warning is shown in the logs
from azure.identity import ClientSecretCredential

sp_credentials = ClientSecretCredential(
    tenant_id="x",
    client_id="x",
    client_secret="x",

access_token = sp_credentials.get_token("2ff814a6-3304-4ab8-85cb-cd0e6f879c1d/.default")

Expected behavior
Parameter to pass the region or to disable auto detection is properly passed as parameter when calling classes from the MSAL package.

Metadata

Metadata

Assignees

Labels

Azure.IdentityClientThis issue points to a problem in the data-plane of the library.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions