Getting error in cosmos db as authorization token is not valid for current time.

Tharrun reddy 1 Reputation point
2021-09-24T02:16:31.257+00:00

Hi All,

I'm using free trail azure subscription and created azure cosmos Account. After successful creation of azure Cosmos Account I have created database. I tried adding documents to the collection its not allowing me to create a documents.

I'm getting below error. Please help with this error. Thanks in Advance

134872-image.png

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,753 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Anurag Sharma 17,616 Reputation points
    2021-09-24T06:59:36.33+00:00

    Hi @Tharrun reddy , welcome to Microsoft Q&A forum and really sorry for the issue you are facing.

    This could be intermittent issue. Can you please try again adding the documents again?

    Also if it does not work can you please check your system time if it is correct as the error message says that the times differ.


  2. I. Shdaifat 1 Reputation point
    2022-10-31T14:00:10.667+00:00

    Hi
    I have same problem my device is in Amman Jordan. The government decided not to change to winter time. So we manually changed the time of the device. When making request to Azure Cosmos we get same problem. Change the device time to automatic will change to winter time and Cosmos works again.
    But we need to keep the device time summer time.
    How to solve this issue?
    Thanks

    0 comments No comments

  3. John Allan Kondwani Zabula 1 Reputation point
    2023-09-13T13:04:46.77+00:00

    Time worked for me. Its was off by an hour

    0 comments No comments

  4. D, Nidhun 0 Reputation points
    2025-02-03T07:16:20.6033333+00:00

    I am also facing a similar issue. I am trying to create a database in azure Cosmos DB using a managed identity, but I am getting an exception. I have deployed the app in a azure web app service

    Response status code does not indicate success: Forbidden (403); Substatus: 5300; ActivityId: a67ece70-6364-44a1-ad3f-2ae31be285bc; Reason: ({"code":"Forbidden","message":"Request blocked by Auth testcosmo123 : The given request [POST /dbs] cannot be authorized by AAD token in data plane.
    
    0 comments No comments

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.