Thank you for your post!
Error Message:
The specified Azure service connection needs to have "Get, List" secret management permissions on the selected key vault. Click "Authorize" to enable Azure Pipelines to set these permissions or manage secret permissions in the Azure portal.
From the Key Vault side of things, your Service Principal (sampleSP01) should have the correct permissions with the given Key Vault Secrets Officer RBAC role. However, your issue could be due to insufficient permissions for the Azure DevOps service account. For more info.
Grant Azure DevOps Access to Key Vault:
- In Azure Portal, navigate to your Key Vault.
- Go to 'Access policies'.
- Add a new access policy.
- Grant the Azure DevOps service account 'Get' and 'List' permissions for secrets (Read-Only access is sufficient for most use cases).
For more info - How to integrate Azure Keyvault with my pipeline
Additional Links:
- Manage service connections
- Azure built-in roles for Key Vault data plane operations
- Key Vault Secrets Officer
- Key Vault Secrets User
I hope this helps!
If you have any other questions, please let me know. Thank you for your time and patience throughout this issue.
If the information helped address your question, please Accept the answer. This will help us and also improve searchability for others in the community who might be researching similar information.