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

AADSTS700024: Client assertion is not within its valid time range beyond 10 minutes #29063

Closed
panpanwa opened this issue May 30, 2024 · 3 comments
Assignees
Labels
Account az login/account Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@panpanwa
Copy link

Describe the bug

We are using AzureCLI@2 task in ADO build pipeline, inside the task, we run python script which calls DefaultAzureCredential to get token. However, we saw the following error:

azure.core.exceptions.ClientAuthenticationError: DefaultAzureCredential failed to retrieve a token from the included credentials.
Attempted credentials:
EnvironmentCredential: EnvironmentCredential authentication unavailable. Environment variables are not fully configured.
Visit https://aka.ms/azsdk/python/identity/environmentcredential/troubleshoot to troubleshoot this issue.
ManagedIdentityCredential: ManagedIdentityCredential authentication unavailable, no response from the IMDS endpoint.
SharedTokenCacheCredential: SharedTokenCacheCredential authentication unavailable. No accounts were found in the cache.
AzureCliCredential: ERROR: AADSTS700024: Client assertion is not within its valid time range. Current time: 2024-05-30T17:38:31.5070957Z, assertion valid from 2024-05-30T17:23:22.0000000Z, expiry time of assertion 2024-05-30T17:33:22.0000000Z. Review the documentation at https://docs.microsoft.com/azure/active-directory/develop/active-directory-certificate-credentials . Trace ID: 2c00309b-583f-4196-8c61-9dc0943e8101 Correlation ID: b7f0e97c-adbf-487f-a3f3-e38882ee081e Timestamp: 2024-05-30 17:38:31Z
Interactive authentication is needed. Please run:
az login

AzurePowerShellCredential: Please run "Connect-AzAccount" to set up account
AzureDeveloperCliCredential: Azure Developer CLI could not be found. Please visit https://aka.ms/azure-dev for installation instructions and then,once installed, authenticate to your Azure account using 'azd auth login'.

To mitigate this issue, please refer to the troubleshooting guidelines here at https://aka.ms/azsdk/python/identity/defaultazurecredential/troubleshoot.

Related command

Call DefaultAzureCredential in Python within this task after 10 minutes

Errors

azure.core.exceptions.ClientAuthenticationError: DefaultAzureCredential failed to retrieve a token from the included credentials.
Attempted credentials:
EnvironmentCredential: EnvironmentCredential authentication unavailable. Environment variables are not fully configured.
Visit https://aka.ms/azsdk/python/identity/environmentcredential/troubleshoot to troubleshoot this issue.
ManagedIdentityCredential: ManagedIdentityCredential authentication unavailable, no response from the IMDS endpoint.
SharedTokenCacheCredential: SharedTokenCacheCredential authentication unavailable. No accounts were found in the cache.
AzureCliCredential: ERROR: AADSTS700024: Client assertion is not within its valid time range. Current time: 2024-05-30T17:38:31.5070957Z, assertion valid from 2024-05-30T17:23:22.0000000Z, expiry time of assertion 2024-05-30T17:33:22.0000000Z. Review the documentation at https://docs.microsoft.com/azure/active-directory/develop/active-directory-certificate-credentials . Trace ID: 2c00309b-583f-4196-8c61-9dc0943e8101 Correlation ID: b7f0e97c-adbf-487f-a3f3-e38882ee081e Timestamp: 2024-05-30 17:38:31Z
Interactive authentication is needed. Please run:
az login

AzurePowerShellCredential: Please run "Connect-AzAccount" to set up account
AzureDeveloperCliCredential: Azure Developer CLI could not be found. Please visit https://aka.ms/azure-dev for installation instructions and then,once installed, authenticate to your Azure account using 'azd auth login'.

To mitigate this issue, please refer to the troubleshooting guidelines here at https://aka.ms/azsdk/python/identity/defaultazurecredential/troubleshoot.

Issue script & Debug output

N/A

Expected behavior

We can call DefaultAzureCredential within the task any time.

Environment Summary

AzureDevops build Pipeline

Additional context

No response

@panpanwa panpanwa added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label May 30, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot Account az login/account labels May 30, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added Azure CLI Team The command of the issue is owned by Azure CLI team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels May 30, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented May 30, 2024

Thank you for opening this issue, we will look into it.

@yonzhan yonzhan removed the bug This issue requires a change to an existing behavior in the product in order to be resolved. label May 31, 2024
@yonzhan yonzhan added this to the Backlog milestone May 31, 2024
@jiasli
Copy link
Member

jiasli commented May 31, 2024

Please see #28708

@jiasli jiasli closed this as completed May 31, 2024
@jhwj9617
Copy link

This also started happening to us for AzureCLI@2 since yesterday. Is it just a coincidence or is there a regression?

Azure.Identity.AuthenticationFailedException: Azure CLI authentication failed due to an unknown error. See the troubleshooting guide for more information. https://aka.ms/azsdk/net/identity/azclicredential/troubleshoot ERROR: AADSTS700024: Client assertion is not within its valid time range. Current time: 2024-05-31T08:24:20.4999940Z, assertion valid from 2024-05-31T07:10:55.0000000Z, expiry time of assertion 2024-05-31T07:20:55.0000000Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Account az login/account Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

4 participants