We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--force-refresh
az account get-access-token
There are some use cases where the user wants to get a new/fresh access token, bypassing the ADAL/MSAL token cache.
More info at Azure/azure-powershell#14005.
Support --force-refresh in az account get-access-token.
ADAL doesn’t support force_refresh:
force_refresh
https://github.com/AzureAD/azure-activedirectory-library-for-python/blob/7dddec09ebeec853986d1f0e66eb5469afb2ccbc/adal/authentication_context.py#L130
def acquire_token(self, resource, user_id, client_id):
MSAL supports force_refresh:
https://github.com/AzureAD/microsoft-authentication-library-for-python/blob/53b99957201b5bea299c91fe634e830535b2ad8f/msal/application.py#L519
def acquire_token_silent( self, scopes, # type: List[str] account, # type: Optional[Account] authority=None, # See get_authorization_request_url() force_refresh=False, # type: Optional[boolean] claims_challenge=None, **kwargs):
The text was updated successfully, but these errors were encountered:
get_token
acquire_token_silent_with_error
support force-refresh
Sorry, something went wrong.
you can do the following as a temporary solution to re-generate the access token: az account clear re-login and then execute get-access-token again
Thanks, az account clear && az login saved my day.
az account clear && az login
jiasli
No branches or pull requests
Requirement
There are some use cases where the user wants to get a new/fresh access token, bypassing the ADAL/MSAL token cache.
More info at Azure/azure-powershell#14005.
Proposed solution
Support
--force-refresh
inaz account get-access-token
.Additional context
ADAL doesn’t support
force_refresh
:https://github.com/AzureAD/azure-activedirectory-library-for-python/blob/7dddec09ebeec853986d1f0e66eb5469afb2ccbc/adal/authentication_context.py#L130
MSAL supports
force_refresh
:https://github.com/AzureAD/microsoft-authentication-library-for-python/blob/53b99957201b5bea299c91fe634e830535b2ad8f/msal/application.py#L519
The text was updated successfully, but these errors were encountered: