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.
- Created a user assigned managed identity under azure managed identity service.
- Added a contributor role in my KeyVault Access control(IAM) -> in the assign access drop down I chose user assigned managed identity.
- Also, in the KeyVault access policy section, added newly created user assigned identity with get and list secret permissions
- 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.
The workarounds for PowerShell Functions are here: https://github.com/Azure/azure-functions-host/issues/5797#issuecomment-601864473