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".
The changes in this proof-of-concept is to allow a typical 3-step pattern MSAL app to automatically utilize the IMDS-like interface when that app happens to be running inside Cloud Shell.
Note to target audience (@jiasli ):
Starting from 3/1/2022, portal and Cloud Shell have been refactored to allow cert and token acquisition, again, via this test URL:
https://rc.portal.azure.com/?feature.sshtokens=true&feature.tokencaching=false#home
Currently, portal and Cloud Shell team are still working on the error handling, but that part does not block Azure CLI from integrating this feature branch.
Currently, the Cloud Shell IMDS-like interface supports only a small set of scopes/resources, such as:
https://management.core.windows.net/,https://management.azure.com/,https://graph.windows.net/,...
When adopting this feature, Azure CLI would need to remove its existing Cloud Shell code path, and use normal MSAL code path.
The changes in this proof-of-concept is to allow a typical 3-step pattern MSAL app to automatically utilize the IMDS-like interface when that app happens to be running inside Cloud Shell.
Note to target audience (@jiasli ):
https://rc.portal.azure.com/?feature.sshtokens=true&feature.tokencaching=false#home
Currently, portal and Cloud Shell team are still working on the error handling, but that part does not block Azure CLI from integrating this feature branch.https://management.core.windows.net/,https://management.azure.com/,https://graph.windows.net/,...