Hi @RSingh
Thank you for reaching us!
The error message "No User Assigned or Delegated Managed Identity found for specified ClientId/ResourceId/PrincipalId" indicates that the managed identity you are using does not have the required permissions to access the specified resource.
To resolve this issue, you need to ensure that the managed identity has the necessary permissions to access the resource. Here are the steps to follow:
- Check if the managed identity is correctly assigned to the function app. You can do this by going to the "Identity" section of the function app in the Azure portal and verifying that the managed identity is enabled.
- Check if the managed identity has the necessary permissions to access the resource. You can do this by going to the "Access control (IAM)" section of the resource in the Azure portal and verifying that the managed identity has the required role assignment.
- If the managed identity does not have the required role assignment, you can add it by clicking on the "Add role assignment" button and selecting the appropriate role.
- If the managed identity is correctly assigned and has the necessary role assignment, then you need to ensure that the resource URL and audience are correct. Double-check that the resource URL and audience are correct and match the resource you are trying to access.
- If you are still getting the same error after following these steps, you can try using the Azure CLI to check the role assignments for the managed identity. You can use the following command:
az role assignment list --assignee-object-id managed-identity-object-id
Replacemanaged-identity-object-id
with the object ID of the managed identity. This command will list all the role assignments for the managed identity. Check if the managed identity has the required role assignment for the resource you are trying to access.
Hope this helps. Do let us know if you any further queries by responding in the comments section.
Thanks,
Akhilesh.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.