azureazure-functionspowershell-6.0

User assigned managed identity in azure functions throwing value cannot be null


I have a http post azure functions that is created using power shell 6.2. It requires access to azure key vault to retrieve secrets. It works perfectly when I assign system assigned managed identity. However, getting the attached error whilst executing with user assigned managed identity.

What I have done so far.

  1. Created a user assigned managed identity under azure managed identity service.
  2. Added a contributor role in my KeyVault Access control(IAM) -> in the assign access drop down I chose user assigned managed identity.
  3. Also, in the KeyVault access policy section, added newly created user assigned identity with get and list secret permissions
  4. Finally added the new user assigned managed identity in the azure function's identity tab.

I have read that user assigned managed identity requires clinet_id but no idea where to configure it in the azure function's post request.

enter image description here


Solution

  • The workarounds for PowerShell Functions are here: https://github.com/Azure/azure-functions-host/issues/5797#issuecomment-601864473