Skip to content
New issue

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

{Core} Decouple get_raw_token from SDK token protocol #31063

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

jiasli
Copy link
Member

@jiasli jiasli commented Mar 18, 2025

Related command
az account get-access-token

Description
Require #25959

Importing azure.core.credentials.AccessToken is expensive. That's why #19898 defines our own AccessToken.

After #25959 is implemented, there will be no need for get_raw_token to use Python SDK's token protocol and data structure at all.

In this PR, get_raw_token directly calls acquire_token on MSAL credentials, instead of Python SDK's get_token protocol.

Testing Guide

az account get-access-token

Copy link

azure-client-tools-bot-prd bot commented Mar 18, 2025

❌AzureCLI-FullTest
️✔️acr
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️acs
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.9
️✔️ams
️✔️latest
️✔️3.12
️✔️3.9
️✔️apim
️✔️latest
️✔️3.12
️✔️3.9
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.9
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.9
️✔️aro
️✔️latest
️✔️3.12
️✔️3.9
️✔️backup
️✔️latest
️✔️3.12
️✔️3.9
️✔️batch
️✔️latest
️✔️3.12
️✔️3.9
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.9
️✔️billing
️✔️latest
️✔️3.12
️✔️3.9
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.9
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.9
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.9
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.9
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.9
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.9
️✔️config
️✔️latest
️✔️3.12
️✔️3.9
️✔️configure
️✔️latest
️✔️3.12
️✔️3.9
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.9
️✔️container
️✔️latest
️✔️3.12
️✔️3.9
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.9
❌core
❌2018-03-01-hybrid
❌3.12
Type Test Case Error Message Line
Failed test_get_raw_token /opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1393: in patched
    with self.decoration_helper(patched,
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:137: in enter
    return next(self.gen)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1375: in decoration_helper
    arg = exit_stack.enter_context(patching)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:526: in enter_context
    result = enter(cm)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1467: in enter
    original, local = self.get_original()
                                       _ 

self = <unittest.mock._patch object at 0x7f31e896e540>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.dict[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'azure.cli.core.auth.util' from '/mnt/vss/_work/1/s/src/azure-cli-core/azure/cli/core/auth/util.py'> does not have the attribute '_now_timestamp'

/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1437: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1145
Failed test_get_raw_token_for_sp /opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1393: in patched
    with self.decoration_helper(patched,
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:137: in enter
    return next(self.gen)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1375: in decoration_helper
    arg = exit_stack.enter_context(patching)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:526: in enter_context
    result = enter(cm)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1467: in enter
    original, local = self.get_original()
                                       _ 

self = <unittest.mock._patch object at 0x7f31e896e720>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.dict[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'azure.cli.core.auth.util' from '/mnt/vss/_work/1/s/src/azure-cli-core/azure/cli/core/auth/util.py'> does not have the attribute '_now_timestamp'

/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1437: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1193
Failed test_get_raw_token_in_cloud_shell /opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1393: in patched
    with self.decoration_helper(patched,
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:137: in enter
    return next(self.gen)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1375: in decoration_helper
    arg = exit_stack.enter_context(patching)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:526: in enter_context
    result = enter(cm)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1467: in enter
    original, local = self.get_original()
                                       _ 

self = <unittest.mock._patch object at 0x7f31e896e8d0>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.dict[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'azure.cli.core.auth.util' from '/mnt/vss/_work/1/s/src/azure-cli-core/azure/cli/core/auth/util.py'> does not have the attribute '_now_timestamp'

/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1437: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1272
Failed test_get_raw_token_mi_system_assigned self = <azure.cli.core.tests.test_profile.TestProfile testMethod=test_get_raw_token_mi_system_assigned>
mock_msi_auth = <MagicMock name='MSIAuthenticationWrapper' spec='MSIAuthenticationWrapper' id='139852315039872'>

    @mock.patch('azure.cli.core.auth.adal_authentication.MSIAuthenticationWrapper', autospec=True)
    def test_get_raw_token_mi_system_assigned(self, mock_msi_auth):
        profile = Profile(cli_ctx=DummyCli(), storage={'subscriptions': None})
        consolidated = profile.normalize_properties('systemAssignedIdentity',
                                                     [deepcopy(self.test_mi_subscription)],
                                                     True,
                                                     user_assigned_identity_id='MSI')
        profile.set_subscriptions(consolidated)
    
        mi_auth_instance = None
    
        def mi_auth_factory(*args, **kwargs):
            nonlocal mi_auth_instance
            mi_auth_instance = MSRestAzureAuthStub(*args, **kwargs)
            return mi_auth_instance
    
        mock_msi_auth.side_effect = mi_auth_factory
    
        # action
>       cred, subscription_id, tenant_id = profile.get_raw_token(resource=self.adal_resource)

src/azure-cli-core/azure/cli/core/tests/test_profile.py:1254: 
 
                                       

self = <azure.cli.core._profile.Profile object at 0x7f31e8dd7350>
resource = 'https://foo/',&nbsp;scopes&nbsp;=&nbsp;['https://foo//.default']
subscription = None, tenant = None

    def get_raw_token(self, resource=None, scopes=None, subscription=None, tenant=None):
        # Convert resource to scopes
        if resource and not scopes:
            from .auth.util import resource_to_scopes
            scopes = resource_to_scopes(resource)
    
        # Use ARM as the default scopes
        if not scopes:
            scopes = self._arm_scope
    
        if subscription and tenant:
            raise CLIError("Please specify only one of subscription and tenant, not both")
    
        account = self.get_subscription(subscription)
    
        managed_identity_type, managed_identity_id = Profile._parse_managed_identity_account(account)
    
        if in_cloud_console() and account[_USER_ENTITY].get(_CLOUD_SHELL_ID):
            # Cloud Shell
            if tenant:
                raise CLIError("Tenant shouldn't be specified for Cloud Shell account")
            from .auth.msal_credentials import CloudShellCredential
            cred = CloudShellCredential()
    
        elif managed_identity_type:
            # managed identity
            if tenant:
                raise CLIError("Tenant shouldn't be specified for managed identity account")
            if _on_azure_arc():
                from .auth.msal_credentials import ManagedIdentityCredential
                cred = ManagedIdentityCredential()
            else:
                # TODO: Wait until MSAL migration
                from .auth.util import scopes_to_resource
                cred = MsiAccountTypes.msi_auth_factory(managed_identity_type, managed_identity_id,
                                                        scopes_to_resource(scopes))
    
        else:
            cred = self._create_credential(account, tenant_id=tenant)
    
>       msal_token = cred.acquire_token(scopes)
E       AttributeError: 'MSRestAzureAuthStub' object has no attribute 'acquire_token'

src/azure-cli-core/azure/cli/core/_profile.py:481: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1234
❌3.9
Type Test Case Error Message Line
Failed test_get_raw_token /opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1333: in patched
    with self.decoration_helper(patched,
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:119: in enter
    return next(self.gen)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1315: in decoration_helper
    arg = exit_stack.enter_context(patching)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:448: in enter_context
    result = cm_type.enter(cm)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1404: in enter
    original, local = self.get_original()
                                       _ 

self = <unittest.mock._patch object at 0x7fc23919cfd0>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.dict[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'azure.cli.core.auth.util' from '/mnt/vss/_work/1/s/src/azure-cli-core/azure/cli/core/auth/util.py'> does not have the attribute '_now_timestamp'

/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1377: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1145
Failed test_get_raw_token_for_sp /opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1333: in patched
    with self.decoration_helper(patched,
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:119: in enter
    return next(self.gen)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1315: in decoration_helper
    arg = exit_stack.enter_context(patching)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:448: in enter_context
    result = cm_type.enter(cm)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1404: in enter
    original, local = self.get_original()
                                       _ 

self = <unittest.mock._patch object at 0x7fc2391a31c0>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.dict[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'azure.cli.core.auth.util' from '/mnt/vss/_work/1/s/src/azure-cli-core/azure/cli/core/auth/util.py'> does not have the attribute '_now_timestamp'

/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1377: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1193
Failed test_get_raw_token_in_cloud_shell /opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1333: in patched
    with self.decoration_helper(patched,
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:119: in enter
    return next(self.gen)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1315: in decoration_helper
    arg = exit_stack.enter_context(patching)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:448: in enter_context
    result = cm_type.enter(cm)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1404: in enter
    original, local = self.get_original()
                                       _ 

self = <unittest.mock._patch object at 0x7fc2391a3490>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.dict[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'azure.cli.core.auth.util' from '/mnt/vss/_work/1/s/src/azure-cli-core/azure/cli/core/auth/util.py'> does not have the attribute '_now_timestamp'

/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1377: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1272
Failed test_get_raw_token_mi_system_assigned self = <azure.cli.core.tests.test_profile.TestProfile testMethod=test_get_raw_token_mi_system_assigned>
mock_msi_auth = <MagicMock name='MSIAuthenticationWrapper' spec='MSIAuthenticationWrapper' id='140472146246192'>

    @mock.patch('azure.cli.core.auth.adal_authentication.MSIAuthenticationWrapper', autospec=True)
    def test_get_raw_token_mi_system_assigned(self, mock_msi_auth):
        profile = Profile(cli_ctx=DummyCli(), storage={'subscriptions': None})
        consolidated = profile.normalize_properties('systemAssignedIdentity',
                                                     [deepcopy(self.test_mi_subscription)],
                                                     True,
                                                     user_assigned_identity_id='MSI')
        profile.set_subscriptions(consolidated)
    
        mi_auth_instance = None
    
        def mi_auth_factory(*args, **kwargs):
            nonlocal mi_auth_instance
            mi_auth_instance = MSRestAzureAuthStub(*args, **kwargs)
            return mi_auth_instance
    
        mock_msi_auth.side_effect = mi_auth_factory
    
        # action
>       cred, subscription_id, tenant_id = profile.get_raw_token(resource=self.adal_resource)

src/azure-cli-core/azure/cli/core/tests/test_profile.py:1254: 
 
                                       

self = <azure.cli.core._profile.Profile object at 0x7fc23861cfa0>
resource = 'https://foo/',&nbsp;scopes&nbsp;=&nbsp;['https://foo//.default']
subscription = None, tenant = None

    def get_raw_token(self, resource=None, scopes=None, subscription=None, tenant=None):
        # Convert resource to scopes
        if resource and not scopes:
            from .auth.util import resource_to_scopes
            scopes = resource_to_scopes(resource)
    
        # Use ARM as the default scopes
        if not scopes:
            scopes = self._arm_scope
    
        if subscription and tenant:
            raise CLIError("Please specify only one of subscription and tenant, not both")
    
        account = self.get_subscription(subscription)
    
        managed_identity_type, managed_identity_id = Profile._parse_managed_identity_account(account)
    
        if in_cloud_console() and account[_USER_ENTITY].get(_CLOUD_SHELL_ID):
            # Cloud Shell
            if tenant:
                raise CLIError("Tenant shouldn't be specified for Cloud Shell account")
            from .auth.msal_credentials import CloudShellCredential
            cred = CloudShellCredential()
    
        elif managed_identity_type:
            # managed identity
            if tenant:
                raise CLIError("Tenant shouldn't be specified for managed identity account")
            if _on_azure_arc():
                from .auth.msal_credentials import ManagedIdentityCredential
                cred = ManagedIdentityCredential()
            else:
                # TODO: Wait until MSAL migration
                from .auth.util import scopes_to_resource
                cred = MsiAccountTypes.msi_auth_factory(managed_identity_type, managed_identity_id,
                                                        scopes_to_resource(scopes))
    
        else:
            cred = self._create_credential(account, tenant_id=tenant)
    
>       msal_token = cred.acquire_token(scopes)
E       AttributeError: 'MSRestAzureAuthStub' object has no attribute 'acquire_token'

src/azure-cli-core/azure/cli/core/_profile.py:481: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1234
❌2019-03-01-hybrid
❌3.12
Type Test Case Error Message Line
Failed test_get_raw_token /opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1393: in patched
    with self.decoration_helper(patched,
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:137: in enter
    return next(self.gen)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1375: in decoration_helper
    arg = exit_stack.enter_context(patching)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:526: in enter_context
    result = enter(cm)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1467: in enter
    original, local = self.get_original()
                                       _ 

self = <unittest.mock._patch object at 0x7fbf749322d0>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.dict[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'azure.cli.core.auth.util' from '/mnt/vss/_work/1/s/src/azure-cli-core/azure/cli/core/auth/util.py'> does not have the attribute '_now_timestamp'

/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1437: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1145
Failed test_get_raw_token_for_sp /opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1393: in patched
    with self.decoration_helper(patched,
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:137: in enter
    return next(self.gen)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1375: in decoration_helper
    arg = exit_stack.enter_context(patching)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:526: in enter_context
    result = enter(cm)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1467: in enter
    original, local = self.get_original()
                                       _ 

self = <unittest.mock._patch object at 0x7fbf749324b0>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.dict[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'azure.cli.core.auth.util' from '/mnt/vss/_work/1/s/src/azure-cli-core/azure/cli/core/auth/util.py'> does not have the attribute '_now_timestamp'

/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1437: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1193
Failed test_get_raw_token_in_cloud_shell /opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1393: in patched
    with self.decoration_helper(patched,
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:137: in enter
    return next(self.gen)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1375: in decoration_helper
    arg = exit_stack.enter_context(patching)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:526: in enter_context
    result = enter(cm)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1467: in enter
    original, local = self.get_original()
                                       _ 

self = <unittest.mock._patch object at 0x7fbf74932660>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.dict[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'azure.cli.core.auth.util' from '/mnt/vss/_work/1/s/src/azure-cli-core/azure/cli/core/auth/util.py'> does not have the attribute '_now_timestamp'

/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1437: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1272
Failed test_get_raw_token_mi_system_assigned self = <azure.cli.core.tests.test_profile.TestProfile testMethod=test_get_raw_token_mi_system_assigned>
mock_msi_auth = <MagicMock name='MSIAuthenticationWrapper' spec='MSIAuthenticationWrapper' id='140460253197376'>

    @mock.patch('azure.cli.core.auth.adal_authentication.MSIAuthenticationWrapper', autospec=True)
    def test_get_raw_token_mi_system_assigned(self, mock_msi_auth):
        profile = Profile(cli_ctx=DummyCli(), storage={'subscriptions': None})
        consolidated = profile.normalize_properties('systemAssignedIdentity',
                                                     [deepcopy(self.test_mi_subscription)],
                                                     True,
                                                     user_assigned_identity_id='MSI')
        profile.set_subscriptions(consolidated)
    
        mi_auth_instance = None
    
        def mi_auth_factory(*args, **kwargs):
            nonlocal mi_auth_instance
            mi_auth_instance = MSRestAzureAuthStub(*args, **kwargs)
            return mi_auth_instance
    
        mock_msi_auth.side_effect = mi_auth_factory
    
        # action
>       cred, subscription_id, tenant_id = profile.get_raw_token(resource=self.adal_resource)

src/azure-cli-core/azure/cli/core/tests/test_profile.py:1254: 
 
                                       

self = <azure.cli.core._profile.Profile object at 0x7fbf74b95be0>
resource = 'https://foo/',&nbsp;scopes&nbsp;=&nbsp;['https://foo//.default']
subscription = None, tenant = None

    def get_raw_token(self, resource=None, scopes=None, subscription=None, tenant=None):
        # Convert resource to scopes
        if resource and not scopes:
            from .auth.util import resource_to_scopes
            scopes = resource_to_scopes(resource)
    
        # Use ARM as the default scopes
        if not scopes:
            scopes = self._arm_scope
    
        if subscription and tenant:
            raise CLIError("Please specify only one of subscription and tenant, not both")
    
        account = self.get_subscription(subscription)
    
        managed_identity_type, managed_identity_id = Profile._parse_managed_identity_account(account)
    
        if in_cloud_console() and account[_USER_ENTITY].get(_CLOUD_SHELL_ID):
            # Cloud Shell
            if tenant:
                raise CLIError("Tenant shouldn't be specified for Cloud Shell account")
            from .auth.msal_credentials import CloudShellCredential
            cred = CloudShellCredential()
    
        elif managed_identity_type:
            # managed identity
            if tenant:
                raise CLIError("Tenant shouldn't be specified for managed identity account")
            if _on_azure_arc():
                from .auth.msal_credentials import ManagedIdentityCredential
                cred = ManagedIdentityCredential()
            else:
                # TODO: Wait until MSAL migration
                from .auth.util import scopes_to_resource
                cred = MsiAccountTypes.msi_auth_factory(managed_identity_type, managed_identity_id,
                                                        scopes_to_resource(scopes))
    
        else:
            cred = self._create_credential(account, tenant_id=tenant)
    
>       msal_token = cred.acquire_token(scopes)
E       AttributeError: 'MSRestAzureAuthStub' object has no attribute 'acquire_token'

src/azure-cli-core/azure/cli/core/_profile.py:481: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1234
❌3.9
Type Test Case Error Message Line
Failed test_get_raw_token /opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1333: in patched
    with self.decoration_helper(patched,
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:119: in enter
    return next(self.gen)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1315: in decoration_helper
    arg = exit_stack.enter_context(patching)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:448: in enter_context
    result = cm_type.enter(cm)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1404: in enter
    original, local = self.get_original()
                                       _ 

self = <unittest.mock._patch object at 0x7f5cb5c0ab50>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.dict[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'azure.cli.core.auth.util' from '/mnt/vss/_work/1/s/src/azure-cli-core/azure/cli/core/auth/util.py'> does not have the attribute '_now_timestamp'

/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1377: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1145
Failed test_get_raw_token_for_sp /opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1333: in patched
    with self.decoration_helper(patched,
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:119: in enter
    return next(self.gen)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1315: in decoration_helper
    arg = exit_stack.enter_context(patching)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:448: in enter_context
    result = cm_type.enter(cm)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1404: in enter
    original, local = self.get_original()
                                       _ 

self = <unittest.mock._patch object at 0x7f5cb5c0ad00>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.dict[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'azure.cli.core.auth.util' from '/mnt/vss/_work/1/s/src/azure-cli-core/azure/cli/core/auth/util.py'> does not have the attribute '_now_timestamp'

/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1377: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1193
Failed test_get_raw_token_in_cloud_shell /opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1333: in patched
    with self.decoration_helper(patched,
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:119: in enter
    return next(self.gen)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1315: in decoration_helper
    arg = exit_stack.enter_context(patching)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:448: in enter_context
    result = cm_type.enter(cm)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1404: in enter
    original, local = self.get_original()
                                       _ 

self = <unittest.mock._patch object at 0x7f5cb5c0afd0>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.dict[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'azure.cli.core.auth.util' from '/mnt/vss/_work/1/s/src/azure-cli-core/azure/cli/core/auth/util.py'> does not have the attribute '_now_timestamp'

/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1377: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1272
Failed test_get_raw_token_mi_system_assigned self = <azure.cli.core.tests.test_profile.TestProfile testMethod=test_get_raw_token_mi_system_assigned>
mock_msi_auth = <MagicMock name='MSIAuthenticationWrapper' spec='MSIAuthenticationWrapper' id='140036147731952'>

    @mock.patch('azure.cli.core.auth.adal_authentication.MSIAuthenticationWrapper', autospec=True)
    def test_get_raw_token_mi_system_assigned(self, mock_msi_auth):
        profile = Profile(cli_ctx=DummyCli(), storage={'subscriptions': None})
        consolidated = profile.normalize_properties('systemAssignedIdentity',
                                                     [deepcopy(self.test_mi_subscription)],
                                                     True,
                                                     user_assigned_identity_id='MSI')
        profile.set_subscriptions(consolidated)
    
        mi_auth_instance = None
    
        def mi_auth_factory(*args, **kwargs):
            nonlocal mi_auth_instance
            mi_auth_instance = MSRestAzureAuthStub(*args, **kwargs)
            return mi_auth_instance
    
        mock_msi_auth.side_effect = mi_auth_factory
    
        # action
>       cred, subscription_id, tenant_id = profile.get_raw_token(resource=self.adal_resource)

src/azure-cli-core/azure/cli/core/tests/test_profile.py:1254: 
 
                                       

self = <azure.cli.core._profile.Profile object at 0x7f5cb49ccac0>
resource = 'https://foo/',&nbsp;scopes&nbsp;=&nbsp;['https://foo//.default']
subscription = None, tenant = None

    def get_raw_token(self, resource=None, scopes=None, subscription=None, tenant=None):
        # Convert resource to scopes
        if resource and not scopes:
            from .auth.util import resource_to_scopes
            scopes = resource_to_scopes(resource)
    
        # Use ARM as the default scopes
        if not scopes:
            scopes = self._arm_scope
    
        if subscription and tenant:
            raise CLIError("Please specify only one of subscription and tenant, not both")
    
        account = self.get_subscription(subscription)
    
        managed_identity_type, managed_identity_id = Profile._parse_managed_identity_account(account)
    
        if in_cloud_console() and account[_USER_ENTITY].get(_CLOUD_SHELL_ID):
            # Cloud Shell
            if tenant:
                raise CLIError("Tenant shouldn't be specified for Cloud Shell account")
            from .auth.msal_credentials import CloudShellCredential
            cred = CloudShellCredential()
    
        elif managed_identity_type:
            # managed identity
            if tenant:
                raise CLIError("Tenant shouldn't be specified for managed identity account")
            if _on_azure_arc():
                from .auth.msal_credentials import ManagedIdentityCredential
                cred = ManagedIdentityCredential()
            else:
                # TODO: Wait until MSAL migration
                from .auth.util import scopes_to_resource
                cred = MsiAccountTypes.msi_auth_factory(managed_identity_type, managed_identity_id,
                                                        scopes_to_resource(scopes))
    
        else:
            cred = self._create_credential(account, tenant_id=tenant)
    
>       msal_token = cred.acquire_token(scopes)
E       AttributeError: 'MSRestAzureAuthStub' object has no attribute 'acquire_token'

src/azure-cli-core/azure/cli/core/_profile.py:481: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1234
❌2020-09-01-hybrid
❌3.12
Type Test Case Error Message Line
Failed test_get_raw_token /opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1393: in patched
    with self.decoration_helper(patched,
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:137: in enter
    return next(self.gen)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1375: in decoration_helper
    arg = exit_stack.enter_context(patching)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:526: in enter_context
    result = enter(cm)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1467: in enter
    original, local = self.get_original()
                                       _ 

self = <unittest.mock._patch object at 0x7fb1d4c5eff0>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.dict[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'azure.cli.core.auth.util' from '/mnt/vss/_work/1/s/src/azure-cli-core/azure/cli/core/auth/util.py'> does not have the attribute '_now_timestamp'

/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1437: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1145
Failed test_get_raw_token_for_sp /opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1393: in patched
    with self.decoration_helper(patched,
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:137: in enter
    return next(self.gen)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1375: in decoration_helper
    arg = exit_stack.enter_context(patching)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:526: in enter_context
    result = enter(cm)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1467: in enter
    original, local = self.get_original()
                                       _ 

self = <unittest.mock._patch object at 0x7fb1d4c5f1d0>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.dict[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'azure.cli.core.auth.util' from '/mnt/vss/_work/1/s/src/azure-cli-core/azure/cli/core/auth/util.py'> does not have the attribute '_now_timestamp'

/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1437: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1193
Failed test_get_raw_token_in_cloud_shell /opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1393: in patched
    with self.decoration_helper(patched,
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:137: in enter
    return next(self.gen)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1375: in decoration_helper
    arg = exit_stack.enter_context(patching)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:526: in enter_context
    result = enter(cm)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1467: in enter
    original, local = self.get_original()
                                       _ 

self = <unittest.mock._patch object at 0x7fb1d4c5f380>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.dict[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'azure.cli.core.auth.util' from '/mnt/vss/_work/1/s/src/azure-cli-core/azure/cli/core/auth/util.py'> does not have the attribute '_now_timestamp'

/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1437: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1272
Failed test_get_raw_token_mi_system_assigned self = <azure.cli.core.tests.test_profile.TestProfile testMethod=test_get_raw_token_mi_system_assigned>
mock_msi_auth = <MagicMock name='MSIAuthenticationWrapper' spec='MSIAuthenticationWrapper' id='140401800583152'>

    @mock.patch('azure.cli.core.auth.adal_authentication.MSIAuthenticationWrapper', autospec=True)
    def test_get_raw_token_mi_system_assigned(self, mock_msi_auth):
        profile = Profile(cli_ctx=DummyCli(), storage={'subscriptions': None})
        consolidated = profile.normalize_properties('systemAssignedIdentity',
                                                     [deepcopy(self.test_mi_subscription)],
                                                     True,
                                                     user_assigned_identity_id='MSI')
        profile.set_subscriptions(consolidated)
    
        mi_auth_instance = None
    
        def mi_auth_factory(*args, **kwargs):
            nonlocal mi_auth_instance
            mi_auth_instance = MSRestAzureAuthStub(*args, **kwargs)
            return mi_auth_instance
    
        mock_msi_auth.side_effect = mi_auth_factory
    
        # action
>       cred, subscription_id, tenant_id = profile.get_raw_token(resource=self.adal_resource)

src/azure-cli-core/azure/cli/core/tests/test_profile.py:1254: 
 
                                       

self = <azure.cli.core._profile.Profile object at 0x7fb1d51e05c0>
resource = 'https://foo/',&nbsp;scopes&nbsp;=&nbsp;['https://foo//.default']
subscription = None, tenant = None

    def get_raw_token(self, resource=None, scopes=None, subscription=None, tenant=None):
        # Convert resource to scopes
        if resource and not scopes:
            from .auth.util import resource_to_scopes
            scopes = resource_to_scopes(resource)
    
        # Use ARM as the default scopes
        if not scopes:
            scopes = self._arm_scope
    
        if subscription and tenant:
            raise CLIError("Please specify only one of subscription and tenant, not both")
    
        account = self.get_subscription(subscription)
    
        managed_identity_type, managed_identity_id = Profile._parse_managed_identity_account(account)
    
        if in_cloud_console() and account[_USER_ENTITY].get(_CLOUD_SHELL_ID):
            # Cloud Shell
            if tenant:
                raise CLIError("Tenant shouldn't be specified for Cloud Shell account")
            from .auth.msal_credentials import CloudShellCredential
            cred = CloudShellCredential()
    
        elif managed_identity_type:
            # managed identity
            if tenant:
                raise CLIError("Tenant shouldn't be specified for managed identity account")
            if _on_azure_arc():
                from .auth.msal_credentials import ManagedIdentityCredential
                cred = ManagedIdentityCredential()
            else:
                # TODO: Wait until MSAL migration
                from .auth.util import scopes_to_resource
                cred = MsiAccountTypes.msi_auth_factory(managed_identity_type, managed_identity_id,
                                                        scopes_to_resource(scopes))
    
        else:
            cred = self._create_credential(account, tenant_id=tenant)
    
>       msal_token = cred.acquire_token(scopes)
E       AttributeError: 'MSRestAzureAuthStub' object has no attribute 'acquire_token'

src/azure-cli-core/azure/cli/core/_profile.py:481: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1234
❌3.9
Type Test Case Error Message Line
Failed test_get_raw_token /opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1333: in patched
    with self.decoration_helper(patched,
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:119: in enter
    return next(self.gen)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1315: in decoration_helper
    arg = exit_stack.enter_context(patching)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:448: in enter_context
    result = cm_type.enter(cm)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1404: in enter
    original, local = self.get_original()
                                       _ 

self = <unittest.mock._patch object at 0x7f907aef9430>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.dict[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'azure.cli.core.auth.util' from '/mnt/vss/_work/1/s/src/azure-cli-core/azure/cli/core/auth/util.py'> does not have the attribute '_now_timestamp'

/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1377: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1145
Failed test_get_raw_token_for_sp /opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1333: in patched
    with self.decoration_helper(patched,
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:119: in enter
    return next(self.gen)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1315: in decoration_helper
    arg = exit_stack.enter_context(patching)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:448: in enter_context
    result = cm_type.enter(cm)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1404: in enter
    original, local = self.get_original()
                                       _ 

self = <unittest.mock._patch object at 0x7f907aef95e0>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.dict[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'azure.cli.core.auth.util' from '/mnt/vss/_work/1/s/src/azure-cli-core/azure/cli/core/auth/util.py'> does not have the attribute '_now_timestamp'

/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1377: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1193
Failed test_get_raw_token_in_cloud_shell /opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1333: in patched
    with self.decoration_helper(patched,
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:119: in enter
    return next(self.gen)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1315: in decoration_helper
    arg = exit_stack.enter_context(patching)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:448: in enter_context
    result = cm_type.enter(cm)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1404: in enter
    original, local = self.get_original()
                                       _ 

self = <unittest.mock._patch object at 0x7f907aef98b0>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.dict[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'azure.cli.core.auth.util' from '/mnt/vss/_work/1/s/src/azure-cli-core/azure/cli/core/auth/util.py'> does not have the attribute '_now_timestamp'

/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1377: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1272
Failed test_get_raw_token_mi_system_assigned self = <azure.cli.core.tests.test_profile.TestProfile testMethod=test_get_raw_token_mi_system_assigned>
mock_msi_auth = <MagicMock name='MSIAuthenticationWrapper' spec='MSIAuthenticationWrapper' id='140258497861856'>

    @mock.patch('azure.cli.core.auth.adal_authentication.MSIAuthenticationWrapper', autospec=True)
    def test_get_raw_token_mi_system_assigned(self, mock_msi_auth):
        profile = Profile(cli_ctx=DummyCli(), storage={'subscriptions': None})
        consolidated = profile.normalize_properties('systemAssignedIdentity',
                                                     [deepcopy(self.test_mi_subscription)],
                                                     True,
                                                     user_assigned_identity_id='MSI')
        profile.set_subscriptions(consolidated)
    
        mi_auth_instance = None
    
        def mi_auth_factory(*args, **kwargs):
            nonlocal mi_auth_instance
            mi_auth_instance = MSRestAzureAuthStub(*args, **kwargs)
            return mi_auth_instance
    
        mock_msi_auth.side_effect = mi_auth_factory
    
        # action
>       cred, subscription_id, tenant_id = profile.get_raw_token(resource=self.adal_resource)

src/azure-cli-core/azure/cli/core/tests/test_profile.py:1254: 
 
                                       

self = <azure.cli.core._profile.Profile object at 0x7f9079f119d0>
resource = 'https://foo/',&nbsp;scopes&nbsp;=&nbsp;['https://foo//.default']
subscription = None, tenant = None

    def get_raw_token(self, resource=None, scopes=None, subscription=None, tenant=None):
        # Convert resource to scopes
        if resource and not scopes:
            from .auth.util import resource_to_scopes
            scopes = resource_to_scopes(resource)
    
        # Use ARM as the default scopes
        if not scopes:
            scopes = self._arm_scope
    
        if subscription and tenant:
            raise CLIError("Please specify only one of subscription and tenant, not both")
    
        account = self.get_subscription(subscription)
    
        managed_identity_type, managed_identity_id = Profile._parse_managed_identity_account(account)
    
        if in_cloud_console() and account[_USER_ENTITY].get(_CLOUD_SHELL_ID):
            # Cloud Shell
            if tenant:
                raise CLIError("Tenant shouldn't be specified for Cloud Shell account")
            from .auth.msal_credentials import CloudShellCredential
            cred = CloudShellCredential()
    
        elif managed_identity_type:
            # managed identity
            if tenant:
                raise CLIError("Tenant shouldn't be specified for managed identity account")
            if _on_azure_arc():
                from .auth.msal_credentials import ManagedIdentityCredential
                cred = ManagedIdentityCredential()
            else:
                # TODO: Wait until MSAL migration
                from .auth.util import scopes_to_resource
                cred = MsiAccountTypes.msi_auth_factory(managed_identity_type, managed_identity_id,
                                                        scopes_to_resource(scopes))
    
        else:
            cred = self._create_credential(account, tenant_id=tenant)
    
>       msal_token = cred.acquire_token(scopes)
E       AttributeError: 'MSRestAzureAuthStub' object has no attribute 'acquire_token'

src/azure-cli-core/azure/cli/core/_profile.py:481: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1234
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_get_raw_token /opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1393: in patched
    with self.decoration_helper(patched,
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:137: in enter
    return next(self.gen)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1375: in decoration_helper
    arg = exit_stack.enter_context(patching)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:526: in enter_context
    result = enter(cm)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1467: in enter
    original, local = self.get_original()
                                       _ 

self = <unittest.mock._patch object at 0x7f30df155340>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.dict[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'azure.cli.core.auth.util' from '/mnt/vss/_work/1/s/src/azure-cli-core/azure/cli/core/auth/util.py'> does not have the attribute '_now_timestamp'

/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1437: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1145
Failed test_get_raw_token_for_sp /opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1393: in patched
    with self.decoration_helper(patched,
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:137: in enter
    return next(self.gen)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1375: in decoration_helper
    arg = exit_stack.enter_context(patching)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:526: in enter_context
    result = enter(cm)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1467: in enter
    original, local = self.get_original()
                                       _ 

self = <unittest.mock._patch object at 0x7f30df155520>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.dict[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'azure.cli.core.auth.util' from '/mnt/vss/_work/1/s/src/azure-cli-core/azure/cli/core/auth/util.py'> does not have the attribute '_now_timestamp'

/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1437: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1193
Failed test_get_raw_token_in_cloud_shell /opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1393: in patched
    with self.decoration_helper(patched,
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:137: in enter
    return next(self.gen)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1375: in decoration_helper
    arg = exit_stack.enter_context(patching)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:526: in enter_context
    result = enter(cm)
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1467: in enter
    original, local = self.get_original()
                                       _ 

self = <unittest.mock._patch object at 0x7f30df1556d0>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.dict[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'azure.cli.core.auth.util' from '/mnt/vss/_work/1/s/src/azure-cli-core/azure/cli/core/auth/util.py'> does not have the attribute '_now_timestamp'

/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/unittest/mock.py:1437: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1272
Failed test_get_raw_token_mi_system_assigned self = <azure.cli.core.tests.test_profile.TestProfile testMethod=test_get_raw_token_mi_system_assigned>
mock_msi_auth = <MagicMock name='MSIAuthenticationWrapper' spec='MSIAuthenticationWrapper' id='139847862797232'>

    @mock.patch('azure.cli.core.auth.adal_authentication.MSIAuthenticationWrapper', autospec=True)
    def test_get_raw_token_mi_system_assigned(self, mock_msi_auth):
        profile = Profile(cli_ctx=DummyCli(), storage={'subscriptions': None})
        consolidated = profile.normalize_properties('systemAssignedIdentity',
                                                     [deepcopy(self.test_mi_subscription)],
                                                     True,
                                                     user_assigned_identity_id='MSI')
        profile.set_subscriptions(consolidated)
    
        mi_auth_instance = None
    
        def mi_auth_factory(*args, **kwargs):
            nonlocal mi_auth_instance
            mi_auth_instance = MSRestAzureAuthStub(*args, **kwargs)
            return mi_auth_instance
    
        mock_msi_auth.side_effect = mi_auth_factory
    
        # action
>       cred, subscription_id, tenant_id = profile.get_raw_token(resource=self.adal_resource)

src/azure-cli-core/azure/cli/core/tests/test_profile.py:1254: 
 
                                       

self = <azure.cli.core._profile.Profile object at 0x7f30de262f60>
resource = 'https://foo/',&nbsp;scopes&nbsp;=&nbsp;['https://foo//.default']
subscription = None, tenant = None

    def get_raw_token(self, resource=None, scopes=None, subscription=None, tenant=None):
        # Convert resource to scopes
        if resource and not scopes:
            from .auth.util import resource_to_scopes
            scopes = resource_to_scopes(resource)
    
        # Use ARM as the default scopes
        if not scopes:
            scopes = self._arm_scope
    
        if subscription and tenant:
            raise CLIError("Please specify only one of subscription and tenant, not both")
    
        account = self.get_subscription(subscription)
    
        managed_identity_type, managed_identity_id = Profile._parse_managed_identity_account(account)
    
        if in_cloud_console() and account[_USER_ENTITY].get(_CLOUD_SHELL_ID):
            # Cloud Shell
            if tenant:
                raise CLIError("Tenant shouldn't be specified for Cloud Shell account")
            from .auth.msal_credentials import CloudShellCredential
            cred = CloudShellCredential()
    
        elif managed_identity_type:
            # managed identity
            if tenant:
                raise CLIError("Tenant shouldn't be specified for managed identity account")
            if _on_azure_arc():
                from .auth.msal_credentials import ManagedIdentityCredential
                cred = ManagedIdentityCredential()
            else:
                # TODO: Wait until MSAL migration
                from .auth.util import scopes_to_resource
                cred = MsiAccountTypes.msi_auth_factory(managed_identity_type, managed_identity_id,
                                                        scopes_to_resource(scopes))
    
        else:
            cred = self._create_credential(account, tenant_id=tenant)
    
>       msal_token = cred.acquire_token(scopes)
E       AttributeError: 'MSRestAzureAuthStub' object has no attribute 'acquire_token'

src/azure-cli-core/azure/cli/core/_profile.py:481: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1234
❌3.9
Type Test Case Error Message Line
Failed test_get_raw_token /opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1333: in patched
    with self.decoration_helper(patched,
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:119: in enter
    return next(self.gen)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1315: in decoration_helper
    arg = exit_stack.enter_context(patching)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:448: in enter_context
    result = cm_type.enter(cm)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1404: in enter
    original, local = self.get_original()
                                       _ 

self = <unittest.mock._patch object at 0x7ffa97a5fd00>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.dict[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'azure.cli.core.auth.util' from '/mnt/vss/_work/1/s/src/azure-cli-core/azure/cli/core/auth/util.py'> does not have the attribute '_now_timestamp'

/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1377: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1145
Failed test_get_raw_token_for_sp /opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1333: in patched
    with self.decoration_helper(patched,
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:119: in enter
    return next(self.gen)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1315: in decoration_helper
    arg = exit_stack.enter_context(patching)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:448: in enter_context
    result = cm_type.enter(cm)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1404: in enter
    original, local = self.get_original()
                                       _ 

self = <unittest.mock._patch object at 0x7ffa97a5feb0>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.dict[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'azure.cli.core.auth.util' from '/mnt/vss/_work/1/s/src/azure-cli-core/azure/cli/core/auth/util.py'> does not have the attribute '_now_timestamp'

/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1377: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1193
Failed test_get_raw_token_in_cloud_shell /opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1333: in patched
    with self.decoration_helper(patched,
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:119: in enter
    return next(self.gen)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1315: in decoration_helper
    arg = exit_stack.enter_context(patching)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:448: in enter_context
    result = cm_type.enter(cm)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1404: in enter
    original, local = self.get_original()
                                       _ 

self = <unittest.mock._patch object at 0x7ffa97a3e1c0>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.dict[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <module 'azure.cli.core.auth.util' from '/mnt/vss/_work/1/s/src/azure-cli-core/azure/cli/core/auth/util.py'> does not have the attribute '_now_timestamp'

/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/unittest/mock.py:1377: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1272
Failed test_get_raw_token_mi_system_assigned self = <azure.cli.core.tests.test_profile.TestProfile testMethod=test_get_raw_token_mi_system_assigned>
mock_msi_auth = <MagicMock name='MSIAuthenticationWrapper' spec='MSIAuthenticationWrapper' id='140714241234544'>

    @mock.patch('azure.cli.core.auth.adal_authentication.MSIAuthenticationWrapper', autospec=True)
    def test_get_raw_token_mi_system_assigned(self, mock_msi_auth):
        profile = Profile(cli_ctx=DummyCli(), storage={'subscriptions': None})
        consolidated = profile.normalize_properties('systemAssignedIdentity',
                                                     [deepcopy(self.test_mi_subscription)],
                                                     True,
                                                     user_assigned_identity_id='MSI')
        profile.set_subscriptions(consolidated)
    
        mi_auth_instance = None
    
        def mi_auth_factory(*args, **kwargs):
            nonlocal mi_auth_instance
            mi_auth_instance = MSRestAzureAuthStub(*args, **kwargs)
            return mi_auth_instance
    
        mock_msi_auth.side_effect = mi_auth_factory
    
        # action
>       cred, subscription_id, tenant_id = profile.get_raw_token(resource=self.adal_resource)

src/azure-cli-core/azure/cli/core/tests/test_profile.py:1254: 
 
                                       

self = <azure.cli.core._profile.Profile object at 0x7ffa965353a0>
resource = 'https://foo/',&nbsp;scopes&nbsp;=&nbsp;['https://foo//.default']
subscription = None, tenant = None

    def get_raw_token(self, resource=None, scopes=None, subscription=None, tenant=None):
        # Convert resource to scopes
        if resource and not scopes:
            from .auth.util import resource_to_scopes
            scopes = resource_to_scopes(resource)
    
        # Use ARM as the default scopes
        if not scopes:
            scopes = self._arm_scope
    
        if subscription and tenant:
            raise CLIError("Please specify only one of subscription and tenant, not both")
    
        account = self.get_subscription(subscription)
    
        managed_identity_type, managed_identity_id = Profile._parse_managed_identity_account(account)
    
        if in_cloud_console() and account[_USER_ENTITY].get(_CLOUD_SHELL_ID):
            # Cloud Shell
            if tenant:
                raise CLIError("Tenant shouldn't be specified for Cloud Shell account")
            from .auth.msal_credentials import CloudShellCredential
            cred = CloudShellCredential()
    
        elif managed_identity_type:
            # managed identity
            if tenant:
                raise CLIError("Tenant shouldn't be specified for managed identity account")
            if _on_azure_arc():
                from .auth.msal_credentials import ManagedIdentityCredential
                cred = ManagedIdentityCredential()
            else:
                # TODO: Wait until MSAL migration
                from .auth.util import scopes_to_resource
                cred = MsiAccountTypes.msi_auth_factory(managed_identity_type, managed_identity_id,
                                                        scopes_to_resource(scopes))
    
        else:
            cred = self._create_credential(account, tenant_id=tenant)
    
>       msal_token = cred.acquire_token(scopes)
E       AttributeError: 'MSRestAzureAuthStub' object has no attribute 'acquire_token'

src/azure-cli-core/azure/cli/core/_profile.py:481: AttributeError
src/azure-cli-core/azure/cli/core/tests/test_profile.py:1234
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.9
️✔️databoxedge
️✔️2019-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️dls
️✔️latest
️✔️3.12
️✔️3.9
️✔️dms
️✔️latest
️✔️3.12
️✔️3.9
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.9
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.9
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.9
️✔️find
️✔️latest
️✔️3.12
️✔️3.9
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.9
️✔️identity
️✔️latest
️✔️3.12
️✔️3.9
️✔️iot
️✔️2019-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️keyvault
️✔️2018-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️lab
️✔️latest
️✔️3.12
️✔️3.9
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.9
️✔️maps
️✔️latest
️✔️3.12
️✔️3.9
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.9
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.9
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.9
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.9
️✔️network
️✔️2018-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.9
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.9
️✔️profile
️✔️latest
️✔️3.12
️✔️3.9
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.9
️✔️redis
️✔️latest
️✔️3.12
️✔️3.9
️✔️relay
️✔️latest
️✔️3.12
️✔️3.9
️✔️resource
️✔️2018-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️role
️✔️latest
️✔️3.12
️✔️3.9
️✔️search
️✔️latest
️✔️3.12
️✔️3.9
️✔️security
️✔️latest
️✔️3.12
️✔️3.9
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.9
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.9
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.9
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.9
️✔️sql
️✔️latest
️✔️3.12
️✔️3.9
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.9
️✔️storage
️✔️2018-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.9
️✔️telemetry
️✔️2018-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️util
️✔️latest
️✔️3.12
️✔️3.9
️✔️vm
️✔️2018-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9

Copy link

Hi @jiasli,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

Copy link

azure-client-tools-bot-prd bot commented Mar 18, 2025

️✔️AzureCLI-BreakingChangeTest
️✔️Non Breaking Changes

@yonzhan
Copy link
Collaborator

yonzhan commented Mar 18, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

Copy link

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@microsoft-github-policy-service microsoft-github-policy-service bot added the Auto-Assign Auto assign by bot label Mar 18, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group Core CLI core infrastructure labels Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group Auto-Assign Auto assign by bot Core CLI core infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants