Azure Key Vault
Read and write Azure Key Vault secrets with versions, soft delete and recovery. Typical uses: read a password at run time, rotate a stored secret.
azure_keyvault pingazure_keyvault putazure_keyvault putazure_keyvault getazure_keyvault getazure_keyvault listazure_keyvault listazure_keyvault versionsazure_keyvault versionsazure_keyvault deleteazure_keyvault recoverazure_keyvault purgeazure_keyvault requestazure_keyvault request

azure_keyvault ping <config>


Description

    Check the vault and the authentication (a list of 1 secret): {ok: true}

Parameters

    config:   The Azure Key Vault configuration as JSON: vault_url (https://.vault.azure.net), the authentication: token (a bearer token already obtained, in an secret) or the client credentials of an app registration: tenant_id, client_id and client_secret (token_url: https://login.microsoftonline.com//oauth2/v2.0/token, scope: https://vault.azure.net/.default); api_version (7.4), ca_file, allow_plain, timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
admin
azure_keyvault ping "{\"vault_url\": \"https://myvault.vault.azure.net\", \"tenant_id\": \"contoso.onmicrosoft.com\", \"client_id\": \"6f1c2a9e-0d1b-4c55-9a51-3e2b7c0f8d11\", \"client_secret\": \"azure_client_secret\"}"
mentdb
{"ok": true}

azure_keyvault put <config> <name> <value>


Description

    Write a secret (a new version). Returns {name, version, id, enabled, created, updated, expires, not_before, managed}

Parameters

    config:   The Azure Key Vault configuration as JSON: vault_url (https://.vault.azure.net), the authentication: token (a bearer token already obtained, in an secret) or the client credentials of an app registration: tenant_id, client_id and client_secret (token_url: https://login.microsoftonline.com//oauth2/v2.0/token, scope: https://vault.azure.net/.default); api_version (7.4), ca_file, allow_plain, timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    name:   The name of the secret (1 to 127 letters, digits or -) - String - required
    value:   The value - String - required
admin
azure_keyvault put "{\"vault_url\": \"https://myvault.vault.azure.net\", \"tenant_id\": \"contoso.onmicrosoft.com\", \"client_id\": \"6f1c2a9e-0d1b-4c55-9a51-3e2b7c0f8d11\", \"client_secret\": \"azure_client_secret\"}" "db-credentials" "{\"user\": \"app\", \"password\": \"Pa55-word!\"}"
mentdb
{"name": "db-credentials", "version": "adeba422f9c54589967502fc56c3acd7", "id": "https://myvault.vault.azure.net/secrets/db-credentials/adeba422f9c54589967502fc56c3acd7", "enabled": true, "created": "2026-11-17T16:24:22Z", "updated": "2026-11-17T16:24:22Z", "expires": null, "not_before": null, "managed": false}

azure_keyvault put <config> <name> <value> <json_params>


Description

    Write with options: content_type, tags (object), enabled, expires and not_before (ISO 8601 date or seconds)

Parameters

    config:   The Azure Key Vault configuration as JSON: vault_url (https://.vault.azure.net), the authentication: token (a bearer token already obtained, in an secret) or the client credentials of an app registration: tenant_id, client_id and client_secret (token_url: https://login.microsoftonline.com//oauth2/v2.0/token, scope: https://vault.azure.net/.default); api_version (7.4), ca_file, allow_plain, timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    name:   The name of the secret (1 to 127 letters, digits or -) - String - required
    value:   The value - String - required
    json_params:   The options as a JSON object - String - required
admin
azure_keyvault put "{\"vault_url\": \"https://myvault.vault.azure.net\", \"tenant_id\": \"contoso.onmicrosoft.com\", \"client_id\": \"6f1c2a9e-0d1b-4c55-9a51-3e2b7c0f8d11\", \"client_secret\": \"azure_client_secret\"}" "smtp-password" "mail-pass" "{\"content_type\": \"text/plain\", \"tags\": {\"team\": \"ops\"}, \"expires\": \"2027-12-31T00:00:00Z\"}"
mentdb
{"name": "smtp-password", "version": "38b45def77794154b4a7fe014154b8df", "id": "https://myvault.vault.azure.net/secrets/smtp-password/38b45def77794154b4a7fe014154b8df", "enabled": true, "created": "2026-11-17T16:24:23Z", "updated": "2026-11-17T16:24:23Z", "expires": "2027-12-31T00:00:00Z", "not_before": null, "managed": false}

azure_keyvault get <config> <name>


Description

    Read the current version of a secret; null when it does not exist (or is deleted)

Parameters

    config:   The Azure Key Vault configuration as JSON: vault_url (https://.vault.azure.net), the authentication: token (a bearer token already obtained, in an secret) or the client credentials of an app registration: tenant_id, client_id and client_secret (token_url: https://login.microsoftonline.com//oauth2/v2.0/token, scope: https://vault.azure.net/.default); api_version (7.4), ca_file, allow_plain, timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    name:   The name of the secret (1 to 127 letters, digits or -) - String - required
admin
azure_keyvault get "{\"vault_url\": \"https://myvault.vault.azure.net\", \"tenant_id\": \"contoso.onmicrosoft.com\", \"client_id\": \"6f1c2a9e-0d1b-4c55-9a51-3e2b7c0f8d11\", \"client_secret\": \"azure_client_secret\"}" "smtp-password"
mentdb
mail-pass
missing (fixed result: Lowkey Vault 4.1.0, an Azure Key Vault emulator, not a real Azure account)
admin
azure_keyvault get "{\"vault_url\": \"https://myvault.vault.azure.net\", \"tenant_id\": \"contoso.onmicrosoft.com\", \"client_id\": \"6f1c2a9e-0d1b-4c55-9a51-3e2b7c0f8d11\", \"client_secret\": \"azure_client_secret\"}" "nothing"
mentdb
null

azure_keyvault get <config> <name> <json_params>


Description

    Read with options: version, field (one field of a JSON secret)

Parameters

    config:   The Azure Key Vault configuration as JSON: vault_url (https://.vault.azure.net), the authentication: token (a bearer token already obtained, in an secret) or the client credentials of an app registration: tenant_id, client_id and client_secret (token_url: https://login.microsoftonline.com//oauth2/v2.0/token, scope: https://vault.azure.net/.default); api_version (7.4), ca_file, allow_plain, timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    name:   The name of the secret (1 to 127 letters, digits or -) - String - required
    json_params:   The options as a JSON object - String - required
admin
azure_keyvault get "{\"vault_url\": \"https://myvault.vault.azure.net\", \"tenant_id\": \"contoso.onmicrosoft.com\", \"client_id\": \"6f1c2a9e-0d1b-4c55-9a51-3e2b7c0f8d11\", \"client_secret\": \"azure_client_secret\"}" "db-credentials" "{\"field\": \"user\"}"
mentdb
app

azure_keyvault list <config>


Description

    The secrets as rows {name, id, enabled, content_type, created, updated, expires, not_before, tags} (no value), 1000 at most

Parameters

    config:   The Azure Key Vault configuration as JSON: vault_url (https://.vault.azure.net), the authentication: token (a bearer token already obtained, in an secret) or the client credentials of an app registration: tenant_id, client_id and client_secret (token_url: https://login.microsoftonline.com//oauth2/v2.0/token, scope: https://vault.azure.net/.default); api_version (7.4), ca_file, allow_plain, timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
admin
azure_keyvault list "{\"vault_url\": \"https://myvault.vault.azure.net\", \"tenant_id\": \"contoso.onmicrosoft.com\", \"client_id\": \"6f1c2a9e-0d1b-4c55-9a51-3e2b7c0f8d11\", \"client_secret\": \"azure_client_secret\"}"
mentdb
[{"name": "billing-smtp", "id": "https://myvault.vault.azure.net/secrets/billing-smtp", "enabled": true, "content_type": null, "created": "2026-11-17T16:23:27Z", "updated": "2026-11-17T16:23:27Z", "expires": null, "not_before": null, "tags": {}}, {"name": "db-credentials", "id": "https://myvault.vault.azure.net/secrets/db-credentials", "enabled": true, "content_type": null, "created": "2026-11-17T16:24:22Z", "updated": "2026-11-17T16:24:22Z", "expires": null, "not_before": null, "tags": {}}, {"name": "smtp-password", "id": "https://myvault.vault.azure.net/secrets/smtp-password", "enabled": true, "content_type": null, "created": "2026-11-17T16:24:23Z", "updated": "2026-11-17T16:24:23Z", "expires": "2027-12-31T00:00:00Z", "not_before": null, "tags": {"team": "ops"}}]

azure_keyvault list <config> <json_params>


Description

    List with options: limit (1000, 100000 at most; the next pages are followed)

Parameters

    config:   The Azure Key Vault configuration as JSON: vault_url (https://.vault.azure.net), the authentication: token (a bearer token already obtained, in an secret) or the client credentials of an app registration: tenant_id, client_id and client_secret (token_url: https://login.microsoftonline.com//oauth2/v2.0/token, scope: https://vault.azure.net/.default); api_version (7.4), ca_file, allow_plain, timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    json_params:   The options as a JSON object - String - required
admin
azure_keyvault list "{\"vault_url\": \"https://myvault.vault.azure.net\", \"tenant_id\": \"contoso.onmicrosoft.com\", \"client_id\": \"6f1c2a9e-0d1b-4c55-9a51-3e2b7c0f8d11\", \"client_secret\": \"azure_client_secret\"}" "{}"
mentdb
[{"name": "billing-smtp", "id": "https://myvault.vault.azure.net/secrets/billing-smtp", "enabled": true, "content_type": null, "created": "2026-11-17T16:23:27Z", "updated": "2026-11-17T16:23:27Z", "expires": null, "not_before": null, "tags": {}}, {"name": "db-credentials", "id": "https://myvault.vault.azure.net/secrets/db-credentials", "enabled": true, "content_type": null, "created": "2026-11-17T16:24:22Z", "updated": "2026-11-17T16:24:22Z", "expires": null, "not_before": null, "tags": {}}, {"name": "smtp-password", "id": "https://myvault.vault.azure.net/secrets/smtp-password", "enabled": true, "content_type": null, "created": "2026-11-17T16:24:23Z", "updated": "2026-11-17T16:24:23Z", "expires": "2027-12-31T00:00:00Z", "not_before": null, "tags": {"team": "ops"}}]

azure_keyvault versions <config> <name>


Description

    The versions of a secret as rows; null when the secret does not exist

Parameters

    config:   The Azure Key Vault configuration as JSON: vault_url (https://.vault.azure.net), the authentication: token (a bearer token already obtained, in an secret) or the client credentials of an app registration: tenant_id, client_id and client_secret (token_url: https://login.microsoftonline.com//oauth2/v2.0/token, scope: https://vault.azure.net/.default); api_version (7.4), ca_file, allow_plain, timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    name:   The name of the secret (1 to 127 letters, digits or -) - String - required
admin
azure_keyvault versions "{\"vault_url\": \"https://myvault.vault.azure.net\", \"tenant_id\": \"contoso.onmicrosoft.com\", \"client_id\": \"6f1c2a9e-0d1b-4c55-9a51-3e2b7c0f8d11\", \"client_secret\": \"azure_client_secret\"}" "db-credentials"
mentdb
[{"name": "db-credentials", "version": "adeba422f9c54589967502fc56c3acd7", "id": "https://myvault.vault.azure.net/secrets/db-credentials/adeba422f9c54589967502fc56c3acd7", "enabled": true, "content_type": null, "created": "2026-11-17T16:24:22Z", "updated": "2026-11-17T16:24:22Z", "expires": null, "not_before": null}]

azure_keyvault versions <config> <name> <json_params>


Description

    Versions with options: limit

Parameters

    config:   The Azure Key Vault configuration as JSON: vault_url (https://.vault.azure.net), the authentication: token (a bearer token already obtained, in an secret) or the client credentials of an app registration: tenant_id, client_id and client_secret (token_url: https://login.microsoftonline.com//oauth2/v2.0/token, scope: https://vault.azure.net/.default); api_version (7.4), ca_file, allow_plain, timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    name:   The name of the secret (1 to 127 letters, digits or -) - String - required
    json_params:   The options as a JSON object - String - required
admin
azure_keyvault versions "{\"vault_url\": \"https://myvault.vault.azure.net\", \"tenant_id\": \"contoso.onmicrosoft.com\", \"client_id\": \"6f1c2a9e-0d1b-4c55-9a51-3e2b7c0f8d11\", \"client_secret\": \"azure_client_secret\"}" "db-credentials" "{}"
mentdb
[{"name": "db-credentials", "version": "adeba422f9c54589967502fc56c3acd7", "id": "https://myvault.vault.azure.net/secrets/db-credentials/adeba422f9c54589967502fc56c3acd7", "enabled": true, "content_type": null, "created": "2026-11-17T16:24:22Z", "updated": "2026-11-17T16:24:22Z", "expires": null, "not_before": null}]

azure_keyvault delete <config> <name>


Description

    Delete a secret (soft delete when the vault has it, the default): {name, recovery_id, deleted_date, scheduled_purge_date}

Parameters

    config:   The Azure Key Vault configuration as JSON: vault_url (https://.vault.azure.net), the authentication: token (a bearer token already obtained, in an secret) or the client credentials of an app registration: tenant_id, client_id and client_secret (token_url: https://login.microsoftonline.com//oauth2/v2.0/token, scope: https://vault.azure.net/.default); api_version (7.4), ca_file, allow_plain, timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    name:   The name of the secret (1 to 127 letters, digits or -) - String - required
admin
azure_keyvault delete "{\"vault_url\": \"https://myvault.vault.azure.net\", \"tenant_id\": \"contoso.onmicrosoft.com\", \"client_id\": \"6f1c2a9e-0d1b-4c55-9a51-3e2b7c0f8d11\", \"client_secret\": \"azure_client_secret\"}" "db-credentials"
mentdb
{"name": "db-credentials", "recovery_id": "https://myvault.vault.azure.net/deletedsecrets/db-credentials", "deleted_date": "2026-11-17T16:24:28Z", "scheduled_purge_date": "2027-02-15T16:24:28Z"}

azure_keyvault recover <config> <name>


Description

    Recover a deleted secret: {name, version, id}

Parameters

    config:   The Azure Key Vault configuration as JSON: vault_url (https://.vault.azure.net), the authentication: token (a bearer token already obtained, in an secret) or the client credentials of an app registration: tenant_id, client_id and client_secret (token_url: https://login.microsoftonline.com//oauth2/v2.0/token, scope: https://vault.azure.net/.default); api_version (7.4), ca_file, allow_plain, timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    name:   The name of the secret (1 to 127 letters, digits or -) - String - required
admin
azure_keyvault recover "{\"vault_url\": \"https://myvault.vault.azure.net\", \"tenant_id\": \"contoso.onmicrosoft.com\", \"client_id\": \"6f1c2a9e-0d1b-4c55-9a51-3e2b7c0f8d11\", \"client_secret\": \"azure_client_secret\"}" "db-credentials"
mentdb
{"name": "db-credentials", "version": "adeba422f9c54589967502fc56c3acd7", "id": "https://myvault.vault.azure.net/secrets/db-credentials/adeba422f9c54589967502fc56c3acd7"}

azure_keyvault purge <config> <name>


Description

    Purge a deleted secret for good (needs the purge permission and a vault whose recovery level allows it): {purged: true}

Parameters

    config:   The Azure Key Vault configuration as JSON: vault_url (https://.vault.azure.net), the authentication: token (a bearer token already obtained, in an secret) or the client credentials of an app registration: tenant_id, client_id and client_secret (token_url: https://login.microsoftonline.com//oauth2/v2.0/token, scope: https://vault.azure.net/.default); api_version (7.4), ca_file, allow_plain, timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    name:   The name of the secret (1 to 127 letters, digits or -) - String - required
admin
azure_keyvault purge "{\"vault_url\": \"https://myvault.vault.azure.net\", \"tenant_id\": \"contoso.onmicrosoft.com\", \"client_id\": \"6f1c2a9e-0d1b-4c55-9a51-3e2b7c0f8d11\", \"client_secret\": \"azure_client_secret\"}" "db-credentials"
mentdb
{"purged": true}

azure_keyvault request <config> <method> <path>


Description

    Any call of the Key Vault REST API from the vault URL (api-version added when missing). Returns the raw JSON body

Parameters

    config:   The Azure Key Vault configuration as JSON: vault_url (https://.vault.azure.net), the authentication: token (a bearer token already obtained, in an secret) or the client credentials of an app registration: tenant_id, client_id and client_secret (token_url: https://login.microsoftonline.com//oauth2/v2.0/token, scope: https://vault.azure.net/.default); api_version (7.4), ca_file, allow_plain, timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    method:   GET, POST, PUT, PATCH or DELETE - String - required
    path:   The path, like /deletedsecrets - String - required
admin
azure_keyvault request "{\"vault_url\": \"https://myvault.vault.azure.net\", \"tenant_id\": \"contoso.onmicrosoft.com\", \"client_id\": \"6f1c2a9e-0d1b-4c55-9a51-3e2b7c0f8d11\", \"client_secret\": \"azure_client_secret\"}" "GET" "/deletedsecrets"
mentdb
{"value":[]}

azure_keyvault request <config> <method> <path> <json_body>


Description

    A raw request with a JSON body

Parameters

    config:   The Azure Key Vault configuration as JSON: vault_url (https://.vault.azure.net), the authentication: token (a bearer token already obtained, in an secret) or the client credentials of an app registration: tenant_id, client_id and client_secret (token_url: https://login.microsoftonline.com//oauth2/v2.0/token, scope: https://vault.azure.net/.default); api_version (7.4), ca_file, allow_plain, timeout_ms (30000), max_bytes (64 MB). Every secret field of a configuration (password, token, api_key, secret_key, client_secret...) gives the NAME of a secret kept with secret set, never the secret itself: a value that is not the name of a secret the user may use is refused, without being shown. A secret is usable by sys and by the members of the groups given to secret set. - String - required
    method:   The HTTP method - String - required
    path:   The path - String - required
    json_body:   The body as JSON - String - required
admin
azure_keyvault request "{\"vault_url\": \"https://myvault.vault.azure.net\", \"tenant_id\": \"contoso.onmicrosoft.com\", \"client_id\": \"6f1c2a9e-0d1b-4c55-9a51-3e2b7c0f8d11\", \"client_secret\": \"azure_client_secret\"}" "PUT" "/secrets/feature-flag" "{\"value\": \"on\", \"contentType\": \"text/plain\"}"
mentdb
{"id":"https://myvault.vault.azure.net/secrets/feature-flag/c54aab7e6bce45b2b240ff2cf005c298","value":"on","contentType":"text/plain","attributes":{"enabled":true,"created":1794932670,"updated":1794932670,"recoveryLevel":"Recoverable","recoverableDays":90},"tags":{},"managed":false}