title: Resource Not Found Azure Cosmos DB
body: <p>Hi We are facing issue while querying . The document exists in the database.</p>
  
  <blockquote>
    <p>"Message: {\"Errors\":[\"Resource Not Found\"]}\r\nActivityId:
    03866338-6596-49b6-8704-1726cb373bfb, Request URI:
    /apps/ab277caf-ee90-4cc3-96cb-4d4ec5ae2b13/services/17e48284-a3a0-40c5-b5ec-40bd3f207472/partitions/27cb7777-5add-4f72-8a73-1fc8fe34e7bf/replicas/131603393672093060p/,
    RequestStats: , SDK: Microsoft.Azure.Documents.Common/1.19.162.2"</p>
  </blockquote>
  
  <p>Document in Database</p>
  
  <pre><code>{
      "consumername": "testconsumer",
      "tablename": "Table1",
      "securityaccount": "v-naagga",
      "logtime": "2018-01-13T21:42:21.3040338-08:00",
      "securitydefinition": {
          "tablename": "table1",
          "ColumnList": {
              "columnname": "name",
              "columndatatype": "string"
          },
          "RowSecurity": {
              "columnname": "address",
              "operator": "operator",
              "condition": "somecondition"
          }
      },
      "id": "15554839-096d-4072-8f38-af2e9c64b452",
      "_rid": "LmUiAONSDQQBAAAAAAAAAA==",
      "_self": "dbs/LmUiAA==/colls/LmUiAONSDQQ=/docs/LmUiAONSDQQBAAAAAAAAAA==/",
      "_etag": "\"00002e04-0000-0000-0000-5a5aedd60000\"",
      "_attachments": "attachments/",
      "_ts": 1515908566
  }
  </code></pre>
  
  <p>Below is the update method code which is throwing this Error</p>
  
  <pre><code>{
              try
              {
                  RequestOptions options = new RequestOptions();
                  options.PartitionKey = new PartitionKey(id);
                  options.ConsistencyLevel = ConsistencyLevel.Session;
                  return await client.ReplaceDocumentAsync(UriFactory.CreateDocumentUri(DatabaseId, SecurityCollectionId, id), item,options).ConfigureAwait(false);
              }
              catch (Exception ex)
              {
                  Logger.Log(ErrorLevel.Error, ex.Message);
                  throw ex;
              }
          }
  </code></pre>