AADSTS700024: Client assertion is not within its valid time range beyond 10 minutes #29063
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
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
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
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
The text was updated successfully, but these errors were encountered: