Share via

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

Tharrun reddy 1 Reputation point
24 Sept 2021, 02:16

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,800 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Anurag Sharma 17,621 Reputation points
    24 Sept 2021, 06:59

    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
    31 Oct 2022, 14: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
    13 Sept 2023, 13:04

    Time worked for me. Its was off by an hour

    0 comments No comments

  4. D, Nidhun 0 Reputation points
    3 Feb 2025, 07:16

    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.