azure.cosmos.exceptions.CosmosHttpResponseError: (Forbidden) Request originated from client IP XXX.XXX.XXX.XX through public internet. This is blocked by your Cosmos DB account firewall settings.

 


azure.cosmos.exceptions.CosmosHttpResponseError

  • Generally when we try to try to connect to cosmos db via any programing language we get below mention error message.

azure.cosmos.exceptions.CosmosHttpResponseError: (Forbidden) Request originated from client IP XXX.XXX.XXX.XX through public internet. This is blocked by your Cosmos DB account firewall settings.

  • To resolve the issue we have to add the IP in the cosmos DB 
  • Below is the steps to add the IP.
    • Open https://portal.azure.com/
    • Open Cosmos DB resource, which you want to access
    • In Settings, select option Firewall and virtual networks 
    • Click on "Add my current IP "XXX,XXX,XXX,XX" highlighted in yellow.
    • You will see one notification related to data base account, update firewall settings





Post a Comment