Azure hosted connection setup
Use this guide for Cloud connections > Azure Key Vault. It runs from the hosted platform; you do not install Python or an agent. The local collector guide is a separate workflow.
You need two separate setup permissions: ownership of the app registration (or permission to manage its federated credentials), and permission to assign Azure roles on the selected keys or discovery vault. The discovery identity itself needs neither of these administrative permissions.
Choose the correct connection path
| Where the scan runs | Identity to configure | Setup action |
|---|---|---|
| Hosted Cloud connections | Dedicated Entra application with federation | Follow this guide; no local Azure CLI sign-in or Python is needed for scanning |
| Agent on your Mac, Windows or Linux workstation | Azure CLI identity under your user account | Select Azure CLI in Getting started, sign in to the vault's directory, and follow the collector guide |
| Agent on an Azure VM or other eligible Azure host | Managed identity attached to that host | Enable the host identity and grant it selected-key access; choosing it in the wizard does not create it |
Exact-resource scans need the full key-version identifier and permission to read that key. Hosted connections also support a vault/key discovery scope with List and Get access. Setting up federation alone does not grant Key Vault access.
1. Create or select the application
In Microsoft Entra ID, select the directory containing your vault and open App registrations. Create a dedicated single-tenant registration or select one your administrator has approved. Copy its Directory (tenant) ID and Application (client) ID into Quantum Ready. Do not use the application Object ID or an enterprise application's Object ID in those two fields. No client secret is needed.
For exact-resource scanning, add full key-version URLs, such as
https://your-vault.vault.azure.net/keys/your-key/0123456789abcdef0123456789abcdef.
Find it in Azure portal > Key vaults > your vault > Keys > your key > a specific version > Key Identifier. Copy the complete HTTPS identifier, including its version. Use a key, not a secret or certificate identifier. This example is not a working key.
Alternatively, choose Discover a vault or key and enter the vault URL or a key URL without its version. See discovery permissions below.
Save the connection and select Show trust configuration.
2. Add the federated credential
In the same app registration, open Certificates & secrets > Federated credentials >
Add credential. Choose Other issuer. Copy the exact issuer, subject and audience
from Quantum Ready. Use the name shown in the generated federated-credential JSON.
The issuer includes /cloud-identity; the subject belongs to this workspace connection;
the audience is api://AzureADTokenExchange. Do not substitute your tenant URL or
application ID for those values.
Cloud Shell alternative
If the portal layout differs, open Azure Cloud Shell in Bash, run az account show --query "{directory:tenantId,subscription:id,name:name}" -o table and confirm the directory matches the connection, then copy Create federated credential from the product. Paste it into Cloud Shell and run it once. The command contains the complete JSON and uses your application client ID directly; no file, variable substitution or object-ID lookup is required.
There are three different IDs: Quantum Ready stores the application client ID; federation is configured on the app registration object ID; key permissions are assigned to the service principal object ID. Use the ID requested by each field. Azure CLI accepts either the client ID or app registration object ID for the federation command; role assignments require the service principal object ID. This follows Microsoft's application federation instructions.
Save the credential. If you recreate the Quantum Ready connection, its subject changes, so create the matching federated credential again.
3. Grant key read permission
Check Key Vault > Access configuration. These steps assume Azure role-based access control. An existing access-policy vault follows a different authorization model; ask its administrator to configure key Get access for the application. Do not switch a shared vault's access model as a setup shortcut.
For an existing access-policy vault: open Access policies > Create, select only Key permissions > Get, and select the enterprise application matching your application client ID as the principal. Create the policy (and select Save if the portal offers it). Do not grant secret or certificate permissions. Skip the RBAC role commands below for this vault. Access policies grant access across the vault, not individual keys; the administrator must approve that scope. The collector still requests only the configured versions. Hosted discovery instead requires both List and Get permissions. See Microsoft?s access-policy instructions.
For the shortest setup, open Create the minimal key-read role in the saved connection. Copy Create role in Cloud Shell Bash, run it in Azure Cloud Shell Bash, and enter the vault subscription ID. Save the returned role ID for Assign the approved role to these keys. This avoids manually editing JSON. If an approved role already exists, reuse its ID.
For manual setup on an RBAC vault, have an authorized Azure administrator create a custom role with
an empty Actions list and this single DataActions entry. Save this Azure CLI
role definition as quantum-ready-role.json, replacing the subscription placeholder:
{
"Name": "Quantum Ready selected key reader",
"IsCustom": true,
"Description": "Read selected Key Vault keys for cryptographic inventory",
"Actions": [],
"NotActions": [],
"DataActions": ["Microsoft.KeyVault/vaults/keys/read"],
"NotDataActions": [],
"AssignableScopes": ["/subscriptions/<subscription-id>"]
}
Create the role with az role definition create --role-definition quantum-ready-role.json
and retain its returned role ID. The subscription-level assignable scope only defines
where the role can be assigned; it does not grant subscription-wide access. Assign
the role at each selected key's Azure resource ID. This permission can read public key material as
well as properties and covers all versions of the selected key. The scanner reads
only configured or discovered versions and discards key material. Do not substitute broad
Contributor, Key Vault Administrator or cryptographic-operation roles.
Find the correct IDs
Use Azure Cloud Shell Bash, select the subscription containing the vault, then run the lookups supplied in Show trust configuration. You need:
- The service principal object ID, obtained with
az ad sp show --id <application-client-id> --query id -o tsv. - The vault resource ID, obtained with
az keyvault show --name <vault-name> --query id -o tsv.
A key's role-assignment scope is the vault resource ID followed by /keys/<key-name>.
It is not the HTTPS key URL, and it does not include the key version. An administrator
can assign the approved custom role with the command below. If the service principal
lookup returns no result, the application owner must provision the enterprise
application with az ad sp create --id <application-client-id>, then repeat the lookup.
An app created through a CLI or API may not have a service principal yet. Do not
create another one when the lookup already succeeds. Ordinary Reader and
Key Vault Contributor do not provide key data access.
For a copyable command with fewer manual substitutions, open Assign the approved role to these keys in the product. Run it in Cloud Shell Bash, then enter the vault subscription ID and the custom role ID you created above. It resolves the service principal and every vault resource ID and checks the directory and the RBAC mode of every vault before creating assignments. It assigns only the listed keys, once per key even when multiple versions were selected. Keep keys from different subscriptions in separate connections for this helper. It does not create the role or change a vault's access model. If a command fails after earlier assignments succeeded, those assignments remain; correct the reported issue before continuing.
To assign the reviewed role manually:
az role assignment create \
--assignee-object-id '<service-principal-object-id>' \
--assignee-principal-type ServicePrincipal \
--role '<custom-role-id>' \
--scope '/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.KeyVault/vaults/<vault-name>/keys/<key-name>'
Replace the labeled placeholders. The identity performing setup needs permission to create the role assignment; the scanner identity does not need that permission.
The console also offers Use Azure Cloud Shell instead of the portal. Select Bash, verify the directory, and copy Create federated credential. This command includes the exact credential JSON; you do not have to create a file or substitute the issuer, subject or audience. It creates trust only: complete the key role assignment separately. For an existing credential, edit it instead of creating a duplicate.
4. Test, then scan
Return to the saved connection and select Test access. After all keys pass, select Run scan. Allow time for Azure changes to propagate before retesting.
| Failure | Check |
|---|---|
| Token exchange fails | Directory and client ID; exact federated issuer, subject and audience; credential saved on the correct app registration |
| Access denied | Service principal assignment; key resource scope; RBAC versus access-policy mode; vault network restrictions |
| Key not found | Actual key-version identifier, correct vault and version |
| Vault is private-only | Hosted scans need an approved network route. Use a collector inside the private network when the hosted platform cannot reach it. Do not open the vault broadly to make a test pass. |
Microsoft federation setup and Key Vault RBAC guidance cover the provider-side controls.
Discover a vault or all versions of one key
In Cloud connections, select Discover a vault or key instead of entering exact versions. Use the canonical vault URL, or a key URL without its version. The connection's generated trust guide provides the required data action and an optional Cloud Shell script that resolves the vault and principal IDs and assigns access at the selected vault or key scope. Vault discovery requires vault-level key-read access. One-key discovery can use key-level RBAC access. Access-policy vaults require Key List and Get permissions at vault scope; retain their existing access model.
The discovery Cloud Shell script resolves your subscription selection to its canonical ID. It creates Quantum Ready key discovery reader once per subscription, or reuses it only when it is a custom role with exactly the listed key-read permission and that subscription's assignable scope. It still assigns access only at the selected vault or key. A same-name role with different permissions, a broader assignable scope, or ambiguous matches stops setup before assignment; ask your Azure administrator to review it. The script never edits an existing role. A failed role lookup also stops setup instead of assuming the role does not exist. See Azure custom-role lookup.
Run Test access after configuring provider trust, then Run scan. Both operations enumerate the current scope; only scans publish inventory. Follow page/resource discovery progress, then metadata-read results in operation history. The cloud connection guide describes scope, pagination checks and coverage limits. Live provider account acceptance is still pending.