Azure / azure-functions-python-worker

Python worker for Azure Functions.
http://aka.ms/azurefunctions
MIT License
331 stars 100 forks source link

Identity-based authentication for event_grid_output function-app decorator is not implemented in Python. #1501

Open luukk opened 1 month ago

luukk commented 1 month ago

According to the Python documentation for Event Grid output bindings, it is possible to connect to Event Grid with Identity-based authentication using the v2 Azure-functions model (https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-event-grid-output?tabs=python-v2%2Cisolated-process%2Cnodejs-v4%2Cextensionv3&pivots=programming-language-python#identity-based-authentication). As explained in this section, you should "define the Connection property in the binding", suggesting that, and correct me if I interpreted this wrong, you should change the @app.event_grid_output to: @app.event_grid_output( arg_name="outputEvent", connection=<CONNECTION_NAME_PREFIX>__topicEndpointUri).

However, using azure-functions with version 1.19.0", @app.event_grid_output() does not implement the connection parameter, causing an error with the message: "missing 2 required positional arguments: 'topic_endpoint_uri' and 'topic_key_setting'".

Is does seem that identity-based authentication is implemented and works for other input/output bindings, giving me the idea that the documentation describes a feature that has not been implemented.

bhagyshricompany commented 6 days ago

Hi @luukk please share the repro steps,fun name ,timestamp etc.