Azure Function with Cosmos DB Input Binding Throws 'Document Not Found' scenarios on Triggered Execution
I'm not sure how to approach I'm updating my dependencies and I'm stuck on something that should probably be simple. Hey everyone, I'm running into an issue that's driving me crazy. I'm currently working on an Azure Function that uses a Cosmos DB input binding to fetch documents based on a specific ID. The function is configured to trigger on an HTTP request, but I'm working with an scenario where it's consistently throwing a `Document Not Found` behavior, even though the document exists in Cosmos DB. Hereβs a snippet of my function configuration: ```csharp [FunctionName("GetDocument")] public static async Task<IActionResult> Run( [HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequest req, [CosmosDB(databaseName: "myDatabase", collectionName: "myCollection", ConnectionStringSetting = "CosmosDBConnection", Id = "{Query.id}")] Document document, ILogger log) { log.LogInformation("C# HTTP trigger function processed a request."); if (document == null) { return new NotFoundResult(); } return new OkObjectResult(document); } ``` I am passing the document ID as a query parameter like this: `?...?id=12345`. The Cosmos DB document indeed exists with that ID, but the behavior keeps popping up. I have confirmed that the connection string is correct and has the necessary permissions. To troubleshoot, I tried logging the value of `Query.id` and it outputs the correct ID, so that part seems fine. Additionally, I verified the Cosmos DB container's consistency level and it is set to `Session`, which should not be an scenario for this scenario. I've also checked the function's runtime logs and there are no additional behavior messages that could provide more context. Does anyone have insights into why the input binding might not be able to find the document? Is there something specific about the configuration or binding that I might be missing? My development environment is Linux. Thanks in advance! This is for a application running on Debian. I'm open to any suggestions. I'm working in a macOS environment. Any help would be greatly appreciated!