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:

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Jeroen VdB
Jeroen VdB

Written by Jeroen VdB

Integration developer with a focus on Microsoft Azure.

Responses (2)

Write a response