Microsoft Authentication Library (MSAL) for Python makes it easy to authenticate to Microsoft Entra ID. General docs are available here https://learn.microsoft.com/entra/msal/python/ Stable APIs are documented here https://msal-python.readthedocs.io. Questions can be asked on www.stackoverflow.com with tag "msal" + "python".
On creation of a ConfidentialClientApplication, MSAL shall detect env variable MSAL_FORCE_REGION, which will be set to a specific region (e.g. westus1)
If this env variable is set, MSAL shall opt-in to ESTS-R with the value of this variable.
Disabling the behavior
If region is explicitly set in MSAL to the string "DisableMsalForceRegion`, then the above no longer applies
Conflicts with WithAzureRegion(xyz)
Use of the api WithRegion(xyz) takes precedence over the env variable.
Acceptance tests
For all of the tests, assume env variable MSAL_FORCE_REGION=eastus
No other config is used. ACTUAL region used: eastus
App developer configures region "westus" in MSAL. ACTUAL region used: westus
App developer configures region "DisableMsalForceRegion" in MSAL. ACTUAL region used: none
Region auto-enable
MSAL_FORCE_REGION
, which will be set to a specific region (e.g.westus1
)Disabling the behavior
If region is explicitly set in MSAL to the string "DisableMsalForceRegion`, then the above no longer applies
Conflicts with
WithAzureRegion(xyz)
Use of the api
WithRegion(xyz)
takes precedence over the env variable.Acceptance tests
For all of the tests, assume env variable MSAL_FORCE_REGION=eastus
App developer configures region "DisableMsalForceRegion" in MSAL. ACTUAL region used: none
Original issue:
https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/4930