diff --git a/libs/adal-0.2.2.zip b/libs/adal-0.2.3rc1.zip similarity index 56% rename from libs/adal-0.2.2.zip rename to libs/adal-0.2.3rc1.zip index fce61488ee7..175cded6c38 100644 Binary files a/libs/adal-0.2.2.zip and b/libs/adal-0.2.3rc1.zip differ diff --git a/requirements.txt b/requirements.txt index 32d7ca8b676..efb8a6f4eb0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,4 +12,4 @@ vcrpy==1.7.4 colorama==0.3.7 # install adal from our libs dir -libs/adal-0.2.2.zip +libs/adal-0.2.3rc1.zip diff --git a/setup.py b/setup.py index f3e74cf827e..7ae790a6b78 100644 --- a/setup.py +++ b/setup.py @@ -65,7 +65,7 @@ ] DEPENDENCIES = [ - 'adal==0.2.2', # from libs/adal-*.zip + 'adal==0.2.3rc1', # from libs/adal-*.zip 'applicationinsights', 'argcomplete', 'azure==2.0.0rc3', diff --git a/src/azure/cli/_profile.py b/src/azure/cli/_profile.py index 00b7840e2db..13f2a942abf 100644 --- a/src/azure/cli/_profile.py +++ b/src/azure/cli/_profile.py @@ -205,8 +205,11 @@ def get_login_credentials(self): user_type = active_account[_USER_ENTITY][_USER_TYPE] username_or_sp_id = active_account[_USER_ENTITY][_USER_NAME] if user_type == _USER: - access_token = self._creds_cache.retrieve_token_for_user(username_or_sp_id, - active_account[_TENANT_ID]) + try: + access_token = self._creds_cache.retrieve_token_for_user(username_or_sp_id, + active_account[_TENANT_ID]) + except adal.AdalError as err: + raise CLIError(err) else: access_token = self._creds_cache.retrieve_token_for_service_principal( username_or_sp_id) diff --git a/src/command_modules/azure-cli-profile/setup.py b/src/command_modules/azure-cli-profile/setup.py index 6fd815a3743..d058f7af5b9 100644 --- a/src/command_modules/azure-cli-profile/setup.py +++ b/src/command_modules/azure-cli-profile/setup.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft. All rights reserved. @@ -38,7 +38,7 @@ DEPENDENCIES = [ 'azure==2.0.0rc3', - 'adal==0.2.2', #from libs/adal-*.zip + 'adal==0.2.3rc1', #from libs/adal-*.zip ] with open('README.rst', 'r', encoding='utf-8') as f: