Giter VIP home page Giter VIP logo

Comments (2)

JasonRShaver avatar JasonRShaver commented on June 17, 2024

Another example:

$ az interactive -s purple
az>> vm create -n MyVM -g MyRG --image UbuntuLTS --progress
az>> Exception in thread Thread-130:
Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/adal_authentication.py", line 23, in signed_session
    scheme, token, _ = self._token_retriever()
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/_profile.py", line 317, in _retrieve_token
    account[_TENANT_ID], resource)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/_profile.py", line 541, in retrieve_token_for_user
    token_entry = context.acquire_token(resource, username, _CLIENT_ID)
  File "/opt/az/lib/python3.6/site-packages/adal/authentication_context.py", line 126, in acquire_tokenh TTL = 2 days
    return self._acquire_token(token_func)
  File "/opt/az/lib/python3.6/site-packages/adal/authentication_context.py", line 109, in _acquire_token
    return token_func(self)
  File "/opt/az/lib/python3.6/site-packages/adal/authentication_context.py", line 124, in token_func
    return token_request.get_token_from_cache_with_refresh(user_id)
  File "/opt/az/lib/python3.6/site-packages/adal/token_request.py", line 350, in get_token_from_cache_with_refresh
    return self._find_token_from_cache()
  File "/opt/az/lib/python3.6/site-packages/adal/token_request.py", line 128, in _find_token_from_cache
    return self._cache_driver.find(cache_query)
  File "/opt/az/lib/python3.6/site-packages/adal/cache_driver.py", line 182, in find
    is_resource_tenant_specific)
  File "/opt/az/lib/python3.6/site-packages/adal/cache_driver.py", line 168, in _refresh_entry_if_necessary
    return self._refresh_expired_entry(entry)
  File "/opt/az/lib/python3.6/site-packages/adal/cache_driver.py", line 146, in _refresh_expired_entry
    token_response = self._refresh_function(entry, None)
  File "/opt/az/lib/python3.6/site-packages/adal/token_request.py", line 138, in _get_token_with_token_response
    return self._get_token_with_refresh_token(refresh_token, resource, None)
  File "/opt/az/lib/python3.6/site-packages/adal/token_request.py", line 342, in _get_token_with_refresh_token
    return self._oauth_get_token(oauth_parameters)
  File "/opt/az/lib/python3.6/site-packages/adal/token_request.py", line 113, in _oauth_get_token
    return client.get_token(oauth_parameters)
  File "/opt/az/lib/python3.6/site-packages/adal/oauth2_client.py", line 281, in get_token
    raise AdalError(return_error_string, error_response)
adal.adal_error.AdalError: Get Token request returned http error: 400 and server response: {"error":"invalid_grant","error_description":"AADSTS70002: Error validating credentials. AADSTS70008: The refresh token has expired due to inactivity. The token was issued on 2017-06-16T01:57:01.3395911Z and was inactive for 14.00:00:00.\r\nTrace ID: 2bf55a76-aa90-4507-bed6-4f50a1682700\r\nCorrelation ID: 36453ed0-d325-449f-93c9-35026f8e771e\r\nTimestamp: 2017-07-05 23:05:08Z","error_codes":[70002,70008],"timestamp":"2017-07-05 23:05:08Z","trace_id":"2bf55a76-aa90-4507-bed6-4f50a1682700","correlation_id":"36453ed0-d325-449f-93c9-35026f8e771e"}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/az/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/opt/az/lib/python3.6/site-packages/azclishell/app.py", line 736, in run
    self.func(self.args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/application.py", line 190, in execute
    _validate_arguments(expanded_arg)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/application.py", line 325, in _validate_arguments
    validator(args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/vm/_validators.py", line 770, in process_vm_create_namespace
    get_default_location_from_resource_group(namespace)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/validators.py", line 49, in get_default_location_from_resource_group
    rg = resource_client.resource_groups.get(namespace.resource_group_name)
  File "/opt/az/lib/python3.6/site-packages/azure/mgmt/resource/resources/v2017_05_10/operations/resource_groups_operations.py", line 284, in get
    response = self._client.send(request, header_parameters, **operation_config)
  File "/opt/az/lib/python3.6/site-packages/msrest/service_client.py", line 176, in send
    session = self.creds.signed_session()
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/adal_authentication.py", line 29, in signed_session
    raise CLIError("Credentials have expired due to inactivity. Please run 'az login'")
azure.cli.core.util.CLIError: Credentials have expired due to inactivity. Please run 'az login'

from azure-cli-extensions.

yonzhan avatar yonzhan commented on June 17, 2024

add feature request.

from azure-cli-extensions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.