Create document failed

Muthazagan R 0 Reputation points
2025-05-18T07:45:57.7133333+00:00

The authorization token is not valid at the current time. Please create another token and retry (token start time: Sun, 18 May 2025 07:50:47 GMT, token expiry time: Sun, 18 May 2025 07:50:47 GMT, current server time: Sun, 18 May 2025 07:43:53 GMT). ActivityId: a7c1237c-f702-44da-8900-754589e02f5b, Microsoft.Azure.Documents.Common/2.14.0

This question is related to the following Learning Module

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,894 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Chiugo Okpala 1,905 Reputation points MVP
    2025-05-18T14:14:50.47+00:00

    @Muthazagan R welcome to the Microsoft Q&A community.

    It looks like you're encountering an issue with an expired or invalid authorization token when trying to create a document in Azure Cosmos DB. This error typically occurs when the token's validity period does not align with the current server time.

    Here are a few things you can check:

    1. Verify System Time – Ensure that your system time is correctly synchronized with the server time. If your local machine's time is incorrect, it can cause token validation issues.
    2. Generate a New Token – Since the token you used has already expired, you need to create a new one and retry the request.
    3. Check Token Generation Logic – If you're programmatically generating tokens, confirm that the logic correctly sets the token's validity period.
    4. Use Automatic Time Settings – If your device's time settings were manually adjusted, consider switching to automatic time synchronization to avoid discrepancies.

    If you're still facing issues, you might find additional insights in the Microsoft Q&A forum or Stack Overflow discussions.

    I hope these helps. Let me know if you have any further questions or need additional assistance.

    Also if these answers your query, do click the "Upvote" and click "Accept the answer" of which might be beneficial to other community members reading this thread.User's image


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.