User Assigned Managed Identity in Azure Functions with Azure.Identity

Jeroen VdB
Oct 19, 2021

Today was trying to authenticate my Azure Function app with a User Assigned Managed Identity using the newer Azure.Idenity NuGet package.

Quickly I ran into the following error:

Exception while executing function: MyFunction ManagedIdentityCredential authentication failed: No MSI found for specified ClientId/ResourceId.Status: 400 (Bad Request)

Solution

Add AZURE_CLIENT_ID to the Application settings with the Client ID of the User Assigned Managed Identity as the value:

--

--

Jeroen VdB

Integration developer with a focus on Microsoft Azure.