OpenStack
OpenStack

Reputation: 5596

How connect Azure function using managed identity with Azure Service bus

I am creating an Azure function using Azure portal. I added trigger and trying to add connection to service bus ( I am adding Azure service bus topic trigger). When I try to add connection string I am only seeing one option called RootManagedSharedAccessKey. I do not want to connect using shared access key. Instead I want to use managed identity. But that option is not at all available. See attached image fore more information. I have already added Managed Identity to Azure function app.

How can I configure function to use managed identity ? I am not deploying\creating function using Visual Studio. I am just using Azure Portal.

enter image description here

Upvotes: 0

Views: 911

Answers (1)

Jahnavi
Jahnavi

Reputation: 8008

Create a managed identity and you need to addAzure role assignments by clicking on add role assignment as below:

  1. Azure Service Bus Data Receiver
  2. Azure Service Bus Data Owner

enter image description here

Now in Service Bus also, You need to assign the same roles whichever given for your managed identity as below:

Service Bus ->Access Control(IAM) -> Add role assignment

enter image description here

After assigning the managed identities, it should reflect in your Service Bus as shown here.

Now create a function in function app by triggering the Azure Service Bus Topic Trigger with the help of managed identity.

enter image description here

enter image description here

Reference link

Upvotes: 0

Related Questions