Open
Description
Azure ML Studio uses similar environment variables to other hosting environments such as Azure App Service. In our previous implementation, we attempted to detect Azure App Service's environment variables before CloudShell. Because CloudShell uses a subset of the environment variables, it will be wrongly detected if it is attempted first in an AzureML environment and fails to add the value of the MSI_SECRET env var in a required header named secret.
See MSAL Python's implementation: https://github.com/AzureAD/microsoft-authentication-library-for-python/blob/dev/msal/managed_identity.py#L415