Storage account connection string does not exist

Matthew Jensen 50 Reputation points
2024-11-11T18:47:53.0833333+00:00

I have a function app which is reading from an Azure Queue, originally it is just using a connection string to connect to the storage account which works, but I am migrating it to use an identity based solution.

This is the guide I have been using:

https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-queue-trigger?tabs=python-v2%2Cisolated-process%2Cnodejs-v4%2Cextensionv5&pivots=programming-language-python#identity-based-connections

I'm using Function V2 Model with Python 3.11.

My original (working) local.settings.json file

User's image

The documentation states to use

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,195 questions
{count} votes

Accepted answer
  1. LeelaRajeshSayana-MSFT 16,701 Reputation points
    2024-11-11T21:03:34.3633333+00:00

    Hi @Matthew Jensen Greetings! Thank you for posting this question on this forum.

    Your Azure Function Queue trigger has the connection property set to queue_storage. What this means is the Function app looks a connection string assigned to the property queue_storage under the Application settings. Since you are running this locally, it will look for a connection setting under local.settings.json file.

    Since there is no value associated with queue_storage under the file, you are encountering this issue. Please change the trigger of the function app as follows and give it a try

    @app.queue_trigger(arg_name="msg", queue_name="inputqueue", connection="queue_storage___queueServiceUri") 
    
    

    Make sure that your storage end point is assigned to the property queue_storage___queueServiceUri in local.settings.json

    Hope this helps! Please let us know if you run into any issues or need further assistance.

    Resolution

    The solution had an old version of the Microsoft.Azure.Functions.ExtensionBundle. Updating this resolved the issue.

    "extensionBundle": {
        "id": "Microsoft.Azure.Functions.ExtensionBundle",
        "version": "[4.0.0, 5.0.0)"
      },
    
    

    If the response helped, please do click Accept Answer and Yes for the answer provided. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.


1 additional answer

Sort by: Most helpful
  1. Matthew Jensen 50 Reputation points
    2024-11-15T13:20:51.6366667+00:00

    There was nothing wrong with the local.settings.json file or the function_app.py file.

    It turns out, that I had a old version of the Microsoft.Azure.Functions.ExtensionBundle, I've updated this and it started working.

    "extensionBundle": {
        "id": "Microsoft.Azure.Functions.ExtensionBundle",
        "version": "[4.0.0, 5.0.0)"
      },
    
    1 person found this answer helpful.

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.