Hi,
Confirm the below is accurate
Verify Role Assignments:
Ensure that the caller (app ID or user) has the necessary role assignments to perform the action. The required role for importing certificates is typically Key Vault Certificates Officer or Key Vault Administrator12.
Check Propagation Time:
If role assignments were recently changed, allow some time for the changes to propagate. This can take a few minutes to several hours2.
Assign Required Roles:
Go to the Azure portal and navigate to the Key Vault resource.
Select "Access Control (IAM)" and add the necessary role assignments:
Key Vault Certificates Officer: Perform any action on the certificates of a key vault, excluding reading the secret and key portions1.
Key Vault Administrator: Perform all data plane operations on a key vault and all objects in it, including certificates, keys, and secrets1.
Verify Permissions:
Ensure that the caller has the Microsoft.KeyVault/vaults/certificates/import/action permission3.
Example Role Assignment
Here’s an example of how to assign the Key Vault Certificates Officer role using Azure CLI:
az role assignment create --assignee {appid} --role "Key Vault Certificates Officer" --scope /subscriptions/{subscription-id}/resourcegroups/{resource-group}/providers/Microsoft.KeyVault/vaults/{vault-name}