Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/azure-cli-core/azure/cli/core/adal_authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
class AdalAuthentication(Authentication): # pylint: disable=too-few-public-methods

def __init__(self, token_retriever, external_tenant_token_retriever=None):
# DO NOT call _token_retriever from outside azure-cli-core. It is only available for user or
# Service Principal credential (AdalAuthentication), but not for Managed Identity credential
# (MSIAuthenticationWrapper).
# To retrieve a raw token, either call
# - Profile.get_raw_token, which is more direct
# - AdalAuthentication.get_token, which is designed for Track 2 SDKs
self._token_retriever = token_retriever
self._external_tenant_token_retriever = external_tenant_token_retriever

Expand Down