Search code examples
azureazure-functionsazure-managed-identity

Using Event Hubs binding for Azure Functions with managed identities?


I'm trying to find information on how to set up the connection strings in a Function App binding so that the app uses managed identities to access Event Hubs and other resources. I'm able to use managed identities in other applications by getting an access token as described in the documentation.

How does this work in Function Apps that take a configuration variable name for connections settings on resource bindings?

Is this documented somewhere?


Solution

  • The short answer should be we can't use Managed identities access token in Function bindings.

    Connection requires the connection string to the event hub's namespace for event hub bindings, the token got using Managed identities is invalid. In Azure Function, we use the access token in same the way you have done in other applications, here's the tutorial.