Search code examples
azure-keyvault

Search secret in Azure key vault


Thousands of secrets are there in my azure key vault. So whenever I need to check/see the secret value at the Azure portal, I will need to scroll up to the end after loading all the secrets multiple times. Is there any shortcut apart from API, available to see the same?


Solution

  • For now, the search text box in keyvault to search for a secret is not supported. You can vote up this feedback to promote it to be achieved.

    However, you can access Azure Key Vault Secret through Azure Key Vault REST API.

    We will start by registering an app in Azure AD and then add that app in the access policies of the key vault.

    Then create a new request in Postman to get the access token.

    https://login.microsoftonline.com/{{directoryId}}/oauth2/v2.0/token
    

    enter image description here

    After that we will send a couple of http requests to get access token and to get a secret’s value.

    https://yourkeyvaultname.vault.azure.net/secrets/Secret1?api-version=2016-10-01
    

    enter image description here