codecov-io: # [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=h1) Report
> Merging [#4091](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=desc) into [master](https://codecov.io/gh/Azure/azure-cli/commit/b3c613ff92ce7bfc40caed5c86fb508c7e7d3710?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `79.03%`.

[![Impacted file tree graph](https://codecov.io/gh/Azure/azure-cli/pull/4091/graphs/tree.svg?token=2pog0TKvF8&src=pr&height=150&width=650)](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #4091      +/-   ##
==========================================
+ Coverage   70.49%   70.49%   +<.01%     
==========================================
  Files         437      437              
  Lines       28086    28132      +46     
  Branches     4300     4314      +14     
==========================================
+ Hits        19800    19833      +33     
- Misses       7004     7017      +13     
  Partials     1282     1282
```


| [Impacted Files](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...ofile/azure/cli/command\_modules/profile/\_params.py](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcHJvZmlsZS9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL3Byb2ZpbGUvX3BhcmFtcy5weQ==) | `68.42% <100%> (+1.75%)` | :arrow_up: |
| [...rofile/azure/cli/command\_modules/profile/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktcHJvZmlsZS9henVyZS9jbGkvY29tbWFuZF9tb2R1bGVzL3Byb2ZpbGUvY3VzdG9tLnB5) | `37.07% <60%> (-0.86%)` | :arrow_down: |
| [src/azure-cli-core/azure/cli/core/\_profile.py](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=tree#diff-c3JjL2F6dXJlLWNsaS1jb3JlL2F6dXJlL2NsaS9jb3JlL19wcm9maWxlLnB5) | `86.44% <80.35%> (-0.96%)` | :arrow_down: |
| [...li-cloud/azure/cli/command\_modules/cloud/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktY2xvdWQvYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9jbG91ZC9jdXN0b20ucHk=) | `13.79% <0%> (ø)` | :arrow_up: |
| [...nent/azure/cli/command\_modules/component/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktY29tcG9uZW50L2F6dXJlL2NsaS9jb21tYW5kX21vZHVsZXMvY29tcG9uZW50L2N1c3RvbS5weQ==) | `16.23% <0%> (ø)` | :arrow_up: |
| [...dback/azure/cli/command\_modules/feedback/custom.py](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=tree#diff-c3JjL2NvbW1hbmRfbW9kdWxlcy9henVyZS1jbGktZmVlZGJhY2svYXp1cmUvY2xpL2NvbW1hbmRfbW9kdWxlcy9mZWVkYmFjay9jdXN0b20ucHk=) | `31.25% <0%> (ø)` | :arrow_up: |
| [src/azure-cli-core/azure/cli/core/util.py](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=tree#diff-c3JjL2F6dXJlLWNsaS1jb3JlL2F6dXJlL2NsaS9jb3JlL3V0aWwucHk=) | `70.66% <0%> (ø)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=footer). Last update [b3c613f...8ef9ee8](https://codecov.io/gh/Azure/azure-cli/pull/4091?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

diff --git a/src/azure-cli-core/azure/cli/core/_profile.py b/src/azure-cli-core/azure/cli/core/_profile.py
index 1d12fd835..7200ab600 100644
--- a/src/azure-cli-core/azure/cli/core/_profile.py
+++ b/src/azure-cli-core/azure/cli/core/_profile.py
@@ -57,6 +57,7 @@ _CLIENT_ID = '04b07795-8ddb-461a-bbee-02f9e1bf7b46'
 _COMMON_TENANT = 'common'
 
 _MSI_ACCOUNT_NAME = 'MSI'
+_TENANT_LEVEL_ACCOUNT_NAME = 'N/A(tenant level account)'
 
 
 def _authentication_context_factory(tenant, cache):
@@ -235,7 +236,7 @@ class Profile(object):
             s.id = '/subscriptions/' + t
             s.subscription = t
             s.tenant_id = t
-            s.display_name = 'N/A(tenant level account)'
+            s.display_name = _TENANT_LEVEL_ACCOUNT_NAME
             result.append(s)
         return result
 
@@ -263,7 +264,7 @@ class Profile(object):
         # use deepcopy as we don't want to persist these changes to file.
         return deepcopy(consolidated)
 
-    def _set_subscriptions(self, new_subscriptions):
+    def _set_subscriptions(self, new_subscriptions, merge=True):
         existing_ones = self.load_cached_subscriptions(all_clouds=True)
         active_one = next((x for x in existing_ones if x.get(_IS_DEFAULT_SUBSCRIPTION)), None)
         active_subscription_id = active_one[_SUBSCRIPTION_ID] if active_one else None
@@ -271,27 +272,31 @@ class Profile(object):
         default_sub_id = None
 
         # merge with existing ones
-        dic = collections.OrderedDict((x[_SUBSCRIPTION_ID], x) for x in existing_ones)
+        if merge:
+            dic = collections.OrderedDict((x[_SUBSCRIPTION_ID], x) for x in existing_ones)
+        else:
+            dic = collections.OrderedDict()
+
         dic.update((x[_SUBSCRIPTION_ID], x) for x in new_subscriptions)
         subscriptions = list(dic.values())
+        if subscriptions:
+            if active_one:
+                new_active_one = next(
+                    (x for x in new_subscriptions if x[_SUBSCRIPTION_ID] == active_subscription_id),
+                    None)
 
-        if active_one:
-            new_active_one = next(
-                (x for x in new_subscriptions if x[_SUBSCRIPTION_ID] == active_subscription_id),
-                None)
+                for s in subscriptions:
+                    s[_IS_DEFAULT_SUBSCRIPTION] = False
 
-            for s in subscriptions:
-                s[_IS_DEFAULT_SUBSCRIPTION] = False
-
-            if not new_active_one:
+                if not new_active_one:
+                    new_active_one = Profile._pick_working_subscription(new_subscriptions)
+            else:
                 new_active_one = Profile._pick_working_subscription(new_subscriptions)
-        else:
-            new_active_one = Profile._pick_working_subscription(new_subscriptions)
 
-        new_active_one[_IS_DEFAULT_SUBSCRIPTION] = True
-        default_sub_id = new_active_one[_SUBSCRIPTION_ID]
+            new_active_one[_IS_DEFAULT_SUBSCRIPTION] = True
+            default_sub_id = new_active_one[_SUBSCRIPTION_ID]
 
-        set_cloud_subscription(active_cloud.name, default_sub_id)
+            set_cloud_subscription(active_cloud.name, default_sub_id)
         self._storage[_SUBSCRIPTIONS] = subscriptions
 
     @staticmethod
@@ -422,6 +427,57 @@ class Profile(object):
                 str(account[_SUBSCRIPTION_ID]),
                 str(account[_TENANT_ID]))
 
+    def refresh_accounts(self, subscription_finder=None):
+        subscriptions = self.load_cached_subscriptions()
+        to_refresh = [s for s in subscriptions if s[_SUBSCRIPTION_NAME] != _MSI_ACCOUNT_NAME]
+        not_to_refresh = [s for s in subscriptions if s not in to_refresh]
+
+        from azure.cli.core._debug import allow_debug_adal_connection
+        allow_debug_adal_connection()
+        subscription_finder = subscription_finder or SubscriptionFinder(self.auth_ctx_factory,
+                                                                        self._creds_cache.adal_token_cache)
+        refreshed_list = set()
+        result = []
+        for s in to_refresh:
+            user_name = s[_USER_ENTITY][_USER_NAME]
+            if user_name in refreshed_list:
+                continue
+            refreshed_list.add(user_name)
+            is_service_principal = (s[_USER_ENTITY][_USER_TYPE] == _SERVICE_PRINCIPAL)
+            tenant = s[_TENANT_ID]
+            subscriptions = []
+            try:
+                if is_service_principal:
+                    sp_auth = ServicePrincipalAuth(self._creds_cache.retrieve_secret_of_service_principal(user_name))
+                    subscriptions = subscription_finder.find_from_service_principal_id(user_name, sp_auth, tenant,
+                                                                                       self._ad_resource_uri)
+                else:
+                    subscriptions = subscription_finder.find_from_user_account(user_name, None, None,
+                                                                               self._ad_resource_uri)
+            except Exception as ex:  # pylint: disable=broad-except
+                logger.warning("Refreshing for '%s' failed with an error '%s'. The existing accounts were not "
+                               "modified. You can run 'az login' later to explictly refresh them", user_name, ex)
+                result += deepcopy([r for r in to_refresh if r[_USER_ENTITY][_USER_NAME] == user_name])
+                continue
+
+            if not subscriptions:
+                if s[_SUBSCRIPTION_NAME] == _TENANT_LEVEL_ACCOUNT_NAME:
+                    subscriptions = Profile._build_tenant_level_accounts([s[_TENANT_ID]])
+
+                if not subscriptions:
+                    continue
+
+            consolidated = Profile._normalize_properties(subscription_finder.user_id,
+                                                         subscriptions,
+                                                         is_service_principal)
+            result += consolidated
+
+        if self._creds_cache.adal_token_cache.has_state_changed:
+            self._creds_cache.persist_cached_creds()
+
+        result = result + not_to_refresh
+        self._set_subscriptions(result, merge=False)
+
     def get_sp_auth_info(self, subscription_id=None, name=None, password=None, cert_file=None):
         from collections import OrderedDict
         account = self.get_subscription(subscription_id)
@@ -561,11 +617,11 @@ class SubscriptionFinder(object):
 
     def find_from_user_account(self, username, password, tenant, resource):
         context = self._create_auth_context(tenant)
-        token_entry = context.acquire_token_with_username_password(
-            resource,
-            username,
-            password,
-            _CLIENT_ID)
+        if password:
+            token_entry = context.acquire_token_with_username_password(resource, username, password, _CLIENT_ID)
+        else:  # when refresh account, we will leverage local cached tokens
+            token_entry = context.acquire_token(resource, username, _CLIENT_ID)
+
         self.user_id = token_entry[_TOKEN_ENTRY_USER_ID]
 
         if tenant is None:
diff --git a/src/command_modules/azure-cli-profile/HISTORY.rst b/src/command_modules/azure-cli-profile/HISTORY.rst
index 6d886b09f..a0d2c4d77 100644
--- a/src/command_modules/azure-cli-profile/HISTORY.rst
+++ b/src/command_modules/azure-cli-profile/HISTORY.rst
@@ -2,6 +2,10 @@
 
 Release History
 ===============
+(unreleased)
++++++++++++++++++++
+* account list: add `--refresh` to sycn up the latest subscriptions from server
+
 2.0.9 (2017-07-27)
 ++++++++++++++++++
 support login inside a VM with a managed identity
diff --git a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py
index 4c2475a03..8a8b2eb98 100644
--- a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py
+++ b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py
@@ -27,4 +27,5 @@ register_cli_argument('logout', 'username', help='account user, if missing, logo
 
 register_cli_argument('account', 'subscription', options_list=('--subscription', '-s'), help='Name or ID of subscription.', completer=get_subscription_id_list)
 register_cli_argument('account list', 'all', help="List all subscriptions, rather just 'Enabled' ones", action='store_true')
+register_cli_argument('account list', 'refresh', help="retrieve up to date subscriptions from server", action='store_true')
 register_cli_argument('account show', 'show_auth_for_sdk', options_list=('--sdk-auth',), action='store_true', help='output result in compatible with Azure SDK auth file')
diff --git a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py
index cbb7845dc..177be9eaf 100644
--- a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py
+++ b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py
@@ -14,15 +14,17 @@ from azure.cli.core.cloud import get_active_cloud
 logger = get_az_logger(__name__)
 
 
-def load_subscriptions(all_clouds=False):
+def load_subscriptions(all_clouds=False, refresh=False):
     profile = Profile()
+    if refresh:
+        subscriptions = profile.refresh_accounts()
     subscriptions = profile.load_cached_subscriptions(all_clouds)
     return subscriptions
 
 
-def list_subscriptions(all=False):  # pylint: disable=redefined-builtin
+def list_subscriptions(all=False, refresh=False):  # pylint: disable=redefined-builtin
     """List the imported subscriptions."""
-    subscriptions = load_subscriptions(all_clouds=all)
+    subscriptions = load_subscriptions(all_clouds=all, refresh=refresh)
     if not subscriptions:
         logger.warning('Please run "az login" to access your accounts.')
     for sub in subscriptions:

Proposal: az account refresh
Sometimes I have new subscriptions associated to my account that did not exist when I did `azure login` so I have to do `azure login` again and go through the interactive login flow to get the new subscriptions I have show up on my local CLI.

Since CLI already has my working credentials, perhaps a new `az account refresh` can re-download my subscriptions list?

diff --git a/src/azure-cli-core/azure/cli/core/tests/test_profile.py b/src/azure-cli-core/azure/cli/core/tests/test_profile.py
index e65acb739..4a4d5fa91 100644
--- a/src/azure-cli-core/azure/cli/core/tests/test_profile.py
+++ b/src/azure-cli-core/azure/cli/core/tests/test_profile.py
@@ -9,6 +9,8 @@ import os
 import unittest
 import mock
 
+from copy import deepcopy
+
 from adal import AdalError
 from azure.mgmt.resource.subscriptions.models import (SubscriptionState, Subscription,
                                                       SubscriptionPolicies, SpendingLimit)
@@ -880,6 +882,81 @@ class Test_Profile(unittest.TestCase):
         mock_auth_context.acquire_token_with_client_certificate.assert_called_once_with(
             mgmt_resource, 'my app', mock.ANY, mock.ANY)
 
+    @mock.patch('adal.AuthenticationContext', autospec=True)
+    def test_refresh_accounts_one_user_account(self, mock_auth_context):
+        storage_mock = {'subscriptions': None}
+        profile = Profile(storage_mock, use_global_creds_cache=False)
+        consolidated = Profile._normalize_properties(self.user1, deepcopy([self.subscription1]), False)
+        profile._set_subscriptions(consolidated)
+        mock_auth_context.acquire_token_with_username_password.return_value = self.token_entry1
+        mock_auth_context.acquire_token.return_value = self.token_entry1
+        mock_arm_client = mock.MagicMock()
+        mock_arm_client.tenants.list.return_value = [TenantStub(self.tenant_id)]
+        mock_arm_client.subscriptions.list.return_value = deepcopy([self.subscription1, self.subscription2])
+        finder = SubscriptionFinder(lambda _, _2: mock_auth_context,
+                                    None,
+                                    lambda _: mock_arm_client)
+        # action
+        profile.refresh_accounts(finder)
+
+        # assert
+        result = storage_mock['subscriptions']
+        self.assertEqual(2, len(result))
+        self.assertEqual(self.id1.split('/')[-1], result[0]['id'])
+        self.assertEqual(self.id2.split('/')[-1], result[1]['id'])
+        self.assertTrue(result[0]['isDefault'])
+
+    @mock.patch('adal.AuthenticationContext', autospec=True)
+    def test_refresh_accounts_one_user_account_one_sp_account(self, mock_auth_context):
+        storage_mock = {'subscriptions': None}
+        profile = Profile(storage_mock, use_global_creds_cache=False)
+        sp_subscription1 = SubscriptionStub('sp-sub/3', 'foo-subname', self.state1, 'foo_tenant.onmicrosoft.com')
+        consolidated = Profile._normalize_properties(self.user1, deepcopy([self.subscription1]), False)
+        consolidated += Profile._normalize_properties('http://foo', [sp_subscription1], True)
+        profile._set_subscriptions(consolidated)
+        mock_auth_context.acquire_token_with_username_password.return_value = self.token_entry1
+        mock_auth_context.acquire_token.return_value = self.token_entry1
+        mock_auth_context.acquire_token_with_client_credentials.return_value = self.token_entry1
+        mock_arm_client = mock.MagicMock()
+        mock_arm_client.tenants.list.return_value = [TenantStub(self.tenant_id)]
+        mock_arm_client.subscriptions.list.side_effect = deepcopy([[self.subscription1], [self.subscription2, sp_subscription1]])
+        finder = SubscriptionFinder(lambda _, _2: mock_auth_context,
+                                    None,
+                                    lambda _: mock_arm_client)
+        profile._creds_cache.retrieve_secret_of_service_principal = lambda _: 'verySecret'
+        profile._creds_cache.flush_to_disk = lambda _: ''
+        # action
+        profile.refresh_accounts(finder)
+
+        # assert
+        result = storage_mock['subscriptions']
+        self.assertEqual(3, len(result))
+        self.assertEqual(self.id1.split('/')[-1], result[0]['id'])
+        self.assertEqual(self.id2.split('/')[-1], result[1]['id'])
+        self.assertEqual('3', result[2]['id'])
+        self.assertTrue(result[0]['isDefault'])
+
+    @mock.patch('adal.AuthenticationContext', autospec=True)
+    def test_refresh_accounts_with_nothing(self, mock_auth_context):
+        storage_mock = {'subscriptions': None}
+        profile = Profile(storage_mock, use_global_creds_cache=False)
+        consolidated = Profile._normalize_properties(self.user1, deepcopy([self.subscription1]), False)
+        profile._set_subscriptions(consolidated)
+        mock_auth_context.acquire_token_with_username_password.return_value = self.token_entry1
+        mock_auth_context.acquire_token.return_value = self.token_entry1
+        mock_arm_client = mock.MagicMock()
+        mock_arm_client.tenants.list.return_value = [TenantStub(self.tenant_id)]
+        mock_arm_client.subscriptions.list.return_value = []
+        finder = SubscriptionFinder(lambda _, _2: mock_auth_context,
+                                    None,
+                                    lambda _: mock_arm_client)
+        # action
+        profile.refresh_accounts(finder)
+
+        # assert
+        result = storage_mock['subscriptions']
+        self.assertEqual(0, len(result))
+
     @mock.patch('azure.cli.core._profile._load_tokens_from_file', autospec=True)
     def test_credscache_load_tokens_and_sp_creds_with_secret(self, mock_read_file):
         test_sp = {

python scripts/dev_setup.py
parse_log_pytest
requirements.txt
pytest
apt-get update apt-get install -y gcc libssl-dev libffi-dev
3.5
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
adal==0.4.3
applicationinsights==0.10.0
argcomplete==1.8.0
astroid==2.11.7
attrs==22.2.0
autopep8==2.0.4
azure-batch==3.0.0
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli&subdirectory=src/azure-cli
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_acr&subdirectory=src/command_modules/azure-cli-acr
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_acs&subdirectory=src/command_modules/azure-cli-acs
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_appservice&subdirectory=src/command_modules/azure-cli-appservice
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_batch&subdirectory=src/command_modules/azure-cli-batch
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_billing&subdirectory=src/command_modules/azure-cli-billing
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_cdn&subdirectory=src/command_modules/azure-cli-cdn
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_cloud&subdirectory=src/command_modules/azure-cli-cloud
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_cognitiveservices&subdirectory=src/command_modules/azure-cli-cognitiveservices
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_component&subdirectory=src/command_modules/azure-cli-component
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_configure&subdirectory=src/command_modules/azure-cli-configure
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_consumption&subdirectory=src/command_modules/azure-cli-consumption
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_container&subdirectory=src/command_modules/azure-cli-container
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_core&subdirectory=src/azure-cli-core
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_cosmosdb&subdirectory=src/command_modules/azure-cli-cosmosdb
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_dla&subdirectory=src/command_modules/azure-cli-dla
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_dls&subdirectory=src/command_modules/azure-cli-dls
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_feedback&subdirectory=src/command_modules/azure-cli-feedback
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_find&subdirectory=src/command_modules/azure-cli-find
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_interactive&subdirectory=src/command_modules/azure-cli-interactive
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_iot&subdirectory=src/command_modules/azure-cli-iot
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_keyvault&subdirectory=src/command_modules/azure-cli-keyvault
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_lab&subdirectory=src/command_modules/azure-cli-lab
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_monitor&subdirectory=src/command_modules/azure-cli-monitor
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_network&subdirectory=src/command_modules/azure-cli-network
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_nspkg&subdirectory=src/azure-cli-nspkg
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_profile&subdirectory=src/command_modules/azure-cli-profile
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_rdbms&subdirectory=src/command_modules/azure-cli-rdbms
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_redis&subdirectory=src/command_modules/azure-cli-redis
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_resource&subdirectory=src/command_modules/azure-cli-resource
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_role&subdirectory=src/command_modules/azure-cli-role
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_sf&subdirectory=src/command_modules/azure-cli-sf
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_sql&subdirectory=src/command_modules/azure-cli-sql
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_storage&subdirectory=src/command_modules/azure-cli-storage
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_taskhelp&subdirectory=src/command_modules/azure-cli-taskhelp
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_testsdk&subdirectory=src/azure-cli-testsdk
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_utility_automation&subdirectory=scripts
-e git+https://github.com/Azure/azure-cli.git@24667566ff4732ad325da0ddcf0eb143f0650c84#egg=azure_cli_vm&subdirectory=src/command_modules/azure-cli-vm
azure-common==1.1.28
azure-core==1.24.2
azure-datalake-store==0.0.12
azure-devtools==0.4.3
azure-graphrbac==0.30.0rc6
azure-keyvault==0.3.4
azure-mgmt-authorization==0.30.0rc6
azure-mgmt-batch==4.0.0
azure-mgmt-billing==0.1.0
azure-mgmt-cdn==0.30.2
azure-mgmt-cognitiveservices==1.0.0
azure-mgmt-compute==2.0.0
azure-mgmt-consumption==0.1.0
azure-mgmt-containerinstance==9.2.0
azure-mgmt-containerregistry==0.3.1
azure-mgmt-core==1.3.2
azure-mgmt-datalake-analytics==0.1.6
azure-mgmt-datalake-nspkg==3.0.1
azure-mgmt-datalake-store==0.1.6
azure-mgmt-devtestlabs==2.0.0
azure-mgmt-dns==1.0.1
azure-mgmt-documentdb==0.1.3
azure-mgmt-iothub==0.2.2
azure-mgmt-keyvault==0.40.0
azure-mgmt-monitor==0.2.1
azure-mgmt-network==1.3.0
azure-mgmt-nspkg==1.0.0
azure-mgmt-rdbms==0.1.0
azure-mgmt-redis==1.0.0
azure-mgmt-resource==1.1.0
azure-mgmt-sql==0.6.0
azure-mgmt-storage==1.1.0
azure-mgmt-trafficmanager==0.30.0
azure-mgmt-web==0.32.0
azure-monitor==0.3.0
azure-multiapi-storage==0.1.0
azure-nspkg==1.0.0
azure-servicefabric==5.6.130
bleach==4.1.0
certifi==2021.5.30
cffi==1.15.1
colorama==0.3.7
ConfigArgParse==1.7
coverage==6.2
cryptography==40.0.2
docutils==0.18.1
flake8==5.0.4
futures==3.1.1
humanfriendly==2.4
idna==3.10
importlib-metadata==4.2.0
iniconfig==1.1.1
isodate==0.7.0
isort==5.10.1
jeepney==0.7.1
jmespath==0.10.0
keyring==23.4.1
lazy-object-proxy==1.7.1
mccabe==0.7.0
mock==5.2.0
msrest==0.7.1
msrestazure==0.4.34
nose==1.3.7
oauthlib==3.2.2
packaging==21.3
paramiko==2.0.2
pbr==6.1.1
pluggy==1.0.0
prompt-toolkit==3.0.36
py==1.11.0
pyasn1==0.5.1
pycodestyle==2.10.0
pycparser==2.21
pydocumentdb==2.3.5
pyflakes==2.5.0
Pygments==2.14.0
PyJWT==2.4.0
pylint==1.7.1
pyOpenSSL==16.2.0
pyparsing==3.1.4
pytest==7.0.1
python-dateutil==2.9.0.post0
pytz==2025.2
PyYAML==3.11
readme-renderer==34.0
requests==2.9.1
requests-oauthlib==2.0.0
scp==0.15.0
SecretStorage==3.3.3
six==1.10.0
sshtunnel==0.4.0
tabulate==0.7.7
tomli==1.2.3
typed-ast==1.5.5
typing-extensions==4.1.1
urllib3==1.26.20
urllib3-secure-extra==0.1.0
vcrpy==1.10.3
vsts-cd-manager==1.0.2
wcwidth==0.2.13
webencodings==0.5.1
Whoosh==2.7.4
wrapt==1.16.0
xmltodict==0.14.2
zipp==3.6.0

name: azure-cli
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - adal==0.4.3
      - applicationinsights==0.10.0
      - argcomplete==1.8.0
      - astroid==2.11.7
      - attrs==22.2.0
      - autopep8==2.0.4
      - azure-batch==3.0.0
      - azure-common==1.1.28
      - azure-core==1.24.2
      - azure-datalake-store==0.0.12
      - azure-devtools==0.4.3
      - azure-graphrbac==0.30.0rc6
      - azure-keyvault==0.3.4
      - azure-mgmt-authorization==0.30.0rc6
      - azure-mgmt-batch==4.0.0
      - azure-mgmt-billing==0.1.0
      - azure-mgmt-cdn==0.30.2
      - azure-mgmt-cognitiveservices==1.0.0
      - azure-mgmt-compute==2.0.0
      - azure-mgmt-consumption==0.1.0
      - azure-mgmt-containerinstance==9.2.0
      - azure-mgmt-containerregistry==0.3.1
      - azure-mgmt-core==1.3.2
      - azure-mgmt-datalake-analytics==0.1.6
      - azure-mgmt-datalake-nspkg==3.0.1
      - azure-mgmt-datalake-store==0.1.6
      - azure-mgmt-devtestlabs==2.0.0
      - azure-mgmt-dns==1.0.1
      - azure-mgmt-documentdb==0.1.3
      - azure-mgmt-iothub==0.2.2
      - azure-mgmt-keyvault==0.40.0
      - azure-mgmt-monitor==0.2.1
      - azure-mgmt-network==1.3.0
      - azure-mgmt-nspkg==1.0.0
      - azure-mgmt-rdbms==0.1.0
      - azure-mgmt-redis==1.0.0
      - azure-mgmt-resource==1.1.0
      - azure-mgmt-sql==0.6.0
      - azure-mgmt-storage==1.1.0
      - azure-mgmt-trafficmanager==0.30.0
      - azure-mgmt-web==0.32.0
      - azure-monitor==0.3.0
      - azure-multiapi-storage==0.1.0
      - azure-nspkg==1.0.0
      - azure-servicefabric==5.6.130
      - bleach==4.1.0
      - cffi==1.15.1
      - colorama==0.3.7
      - configargparse==1.7
      - coverage==6.2
      - cryptography==40.0.2
      - docutils==0.18.1
      - flake8==5.0.4
      - futures==3.1.1
      - humanfriendly==2.4
      - idna==3.10
      - importlib-metadata==4.2.0
      - iniconfig==1.1.1
      - isodate==0.7.0
      - isort==5.10.1
      - jeepney==0.7.1
      - jmespath==0.10.0
      - keyring==23.4.1
      - lazy-object-proxy==1.7.1
      - mccabe==0.7.0
      - mock==5.2.0
      - msrest==0.7.1
      - msrestazure==0.4.34
      - nose==1.3.7
      - oauthlib==3.2.2
      - packaging==21.3
      - paramiko==2.0.2
      - pbr==6.1.1
      - pip==9.0.1
      - pluggy==1.0.0
      - prompt-toolkit==3.0.36
      - py==1.11.0
      - pyasn1==0.5.1
      - pycodestyle==2.10.0
      - pycparser==2.21
      - pydocumentdb==2.3.5
      - pyflakes==2.5.0
      - pygments==2.14.0
      - pyjwt==2.4.0
      - pylint==1.7.1
      - pyopenssl==16.2.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - pyyaml==3.11
      - readme-renderer==34.0
      - requests==2.9.1
      - requests-oauthlib==2.0.0
      - scp==0.15.0
      - secretstorage==3.3.3
      - setuptools==30.4.0
      - six==1.10.0
      - sshtunnel==0.4.0
      - tabulate==0.7.7
      - tomli==1.2.3
      - typed-ast==1.5.5
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - urllib3-secure-extra==0.1.0
      - vcrpy==1.10.3
      - vsts-cd-manager==1.0.2
      - wcwidth==0.2.13
      - webencodings==0.5.1
      - whoosh==2.7.4
      - wrapt==1.16.0
      - xmltodict==0.14.2
      - zipp==3.6.0
prefix: /opt/conda/envs/azure-cli

src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_refresh_accounts_one_user_account src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_refresh_accounts_one_user_account_one_sp_account src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_refresh_accounts_with_nothing
src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_cloud_console_login src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_service_principal_using_cert src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_service_principal_auth_client_cert
src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_create_account_without_subscriptions_thru_common_tenant src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_create_account_without_subscriptions_thru_service_principal src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_create_account_without_subscriptions_without_tenant src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_create_token_cache src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_add_new_sp_creds src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_add_preexisting_sp_creds src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_load_tokens_and_sp_creds_with_cert src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_load_tokens_and_sp_creds_with_secret src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_new_token_added_by_adal src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_credscache_remove_creds src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_default_active_subscription_to_non_disabled_one src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_do_nothing_if_not_in_msi_env src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_particular_tenent src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_from_service_principal_id src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_interactive_from_particular_tenent src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_through_interactive_flow src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_thru_username_password src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_thru_username_password_adfs src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_find_subscriptions_thru_username_password_with_account_disabled src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_auth_info_fail_on_user_account src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_auth_info_for_logged_in_service_principal src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_auth_info_for_newly_created_service_principal src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_current_account_user src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_login_credentials src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_login_credentials_for_data_lake_client src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_login_credentials_for_graph_client src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_login_credentials_msi src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_raw_token src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_get_subscription src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_init_if_in_msi_env src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_load_cached_tokens src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_logout src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_logout_all src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_msi_token_request_retries src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_normalize src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_service_principal_auth_client_secret src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_set_active_subscription src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_subscription_finder_constructor src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_update_add_two_different_subscriptions src/azure-cli-core/azure/cli/core/tests/test_profile.py::Test_Profile::test_update_with_same_subscription_added_twice
src/command_modules/azure-cli-profile/HISTORY.rst src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py src/azure-cli-core/azure/cli/core/_profile.py
src/command_modules/azure-cli-profile/HISTORY.rst src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_params.py src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py src/azure-cli-core/azure/cli/core/_profile.py