Thanks for reaching out to Microsoft Q&A.
As you are assigning the managed identity to function app, you need permissions at Entra level which will be assigned by Entra admin
Your Entra ID Admin should grant below permissions:
- Enable Application Developer directory role for you
or
Enable tenant setting:
Azure AD => User Settings => App registrations =>
“Users can create app registrations” = YES
or
Admin can enable the identity after you create the Function App
(Function App => Identity => System assigned => ON)
As an alternative:
You can follow below steps to assign managed identity to Azure function app:
- Create function app(ignore authentication)
- Create a User assigned managed identity.
- Navigate to function app=>Identity=>Add user assigned managed identity.
- Open Storage account=>Access role(IAM)=>add role assignment=> assign Storage Account contributor role to Functionapp's managed identity.
- In Function app=>Environment Variables=>Add below App settings YAML
YAML
AzureWebJobsStorage__accountName: <STORAGE_ACCOUNT_NAME> AzureWebJobsStorage__credential: managedidentity AzureWebJobsStorage__blobServiceUri:https://mystorageaccount.blob.core.windows.net, AzureWebJobsStorage__queueServiceUri:https://mystorageaccount.queue.core.windows.net AzureWebJobsStorage__tableServiceUri:https://mystorageaccount.table.core.windows.net
Now, you will be able to connect functionapp with storage account using managed identity.
Here's the official MSDOC for enabling managed identity in function app after creation. https://learn.microsoft.com/en-us/azure/azure-functions/functions-identity-based-connections-tutorial
Update: As discussed, we have conveyed the feedback to respective document team.
Hope it helps!
Please do not forget to click "Accept the answer” and Yes, this can be beneficial to other community members.
If you have any other questions, let me know in the "comments" and I would be happy to help you.