title: Using User Managed Identity in Azure function Service Bus triggers not working
body: <p>I have a function that uses Service bus trigger and wanted to use &quot;User Managed Identity&quot;. I couldn't get this working even after following all the config settings.
  Below is the config I am using :</p>
  <p>The Function trigger looks like:</p>
  <pre><code>public static async Task Run([ServiceBusTrigger(&quot;myqueue&quot;, Connection = &quot;ServiceBusUsrIdty&quot;)] ServiceBusReceivedMessage[] servBusRcvMsg, ILogger log)
  </code></pre>
  <p>In the App settings:</p>
  <pre><code>ServiceBusUsrIdty__fullyQualifiedNamespace = &lt;service bus namespace&gt;.servicebus.windows.net
  ServiceBusUsrIdty__clientId = &lt;client id of the user managed identity&gt;
  ServiceBusUsrIdty__credential = &quot;managedidentity&quot;
  </code></pre>
  <p>With the above setting, I couldn't get it working and I then added the below as well but no luck
  AzureWebJobsServiceBusUsrIdty = &quot;Endpoint=sb://.servicebus.windows.net/;Authentication=ManagedIdentity&quot;</p>
  <p>I am using the package : Azure.Messaging.ServiceBus v7.5.1
  The User managed identity is added in the Function App settings and it was granted &quot;Contributor&quot; access in the service bus</p>
  <p>What else am I missing to get this working ? The documentation from Microsoft doesn't sufficient details though.</p>