containerId null when using cosmosDB as an input bindung for a azure function

Nicolas Fromme 25 Reputation points
2023-12-06T10:16:34.16+00:00

Hi all,

I am trying to read some data from my cosmosDB-Database into an azure Function using an input binding. I followed this tutorial:

https://video2.skills-academy.com/en-us/training/modules/chain-azure-functions-data-using-bindings/5-read-data-with-input-bindings-portal-lab?pivots=javascript

Now I am running into the following error message: Value cannot be null. (Parameter 'containerId')

Any help is greatly appreciated!

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,572 questions
Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,520 questions
{count} votes

Accepted answer
  1. MuthuKumaranMurugaachari-MSFT 22,261 Reputation points
    2023-12-08T17:17:10.0333333+00:00

    Nicolas Fromme Glad that you have resolved the issue and thanks for sharing it with the community which will greatly help others with similar issues. As per Microsoft Q&A community policy: "The question author cannot accept their own answer. They can only accept answers by others", I'll repost your solution in case you'd like to "Accept" the answer.

    Resolution:

    Nicolas Fromme Changed the key collectionName to containerName in function.json to resolve the issue.

    Also, would like to share that the tutorial follows older extension 2+ which has references such as CollectionName, ConnectionStringSetting etc. however, in newer extension 4.x+, it has been changed to ContainerName, Connection etc. and here is the doc reference: Attributes.

    We will pass feedback to doc author team to make the changes for the latest extension version. I hope this helps and let us know if any questions.

    3 people found this answer helpful.

0 additional answers

Sort by: Most helpful