# KeyVault

Cloud applications and services use cryptographic keys and secrets to help keep information secure. Azure Key Vault safeguards these keys and secrets. When you use Key Vault, you can encrypt authentication keys, storage account keys, data encryption keys, .pfx files, and passwords by using keys that are protected by hardware security modules.

## Create KeyVault

The following table shows the steps for the creation of Azure KeyVault and the configuration of Access Policy for RealmJoin LAPS:

| Task                                                                                                                                                                                                                                                                                                                          | Image                                                               |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| 1. Open [Azure Portal](https://portal.azure.com)                                                                                                                                                                                                                                                                              |                                                                     |
| 2. Start with **Create a resource**                                                                                                                                                                                                                                                                                           | ![](/files/Me7UcGhnwEPpEyZ7s6bI)                                    |
| 3. Type in **Key Vault** in the search field                                                                                                                                                                                                                                                                                  | ![](/files/XpDqQyuXUgvYv1rM07m0)                                    |
| 4. On the detail page click **Create**                                                                                                                                                                                                                                                                                        |                                                                     |
| <p>5. Fill out the required fields on the Basic Tab.<br><br>Please make sure to use a distinct naming scheme for the KeyVault URL.<br><br>For example: <em>rj-\[tenant]-\[service]</em></p><p>Note: This is a DNS name, so global unique<br><br>Press <strong>Next</strong>.</p>                                              | ![](/files/9M6IgB6NEQV7fLUiiHqK)                                    |
| <p>6. Access configuration<br><br>Please choose <strong>"Vault access policy"</strong> for Permission model.</p>                                                                                                                                                                                                              | <img src="/files/1SJNBfGtBGNeBfCu8UwT" alt="" data-size="original"> |
| <p>7. Create an Access Policy for RealmJoin<br><br>Press <em><strong>Create</strong></em> and choose <strong>"Key, Secret & Certificate Management"</strong> as template.<br><br>Additional add <em><strong>"Select all"</strong></em> for <strong>Cryptographic Operations.</strong><br><br>Press <strong>Next</strong>.</p> | <img src="/files/tgKOKUlWP8fuKP96IBFo" alt="" data-size="original"> |
| <p>8. Add "RealmJoin" as Principal<br><br>Press <strong>Next</strong>.</p>                                                                                                                                                                                                                                                    |                                                                     |
| 9. Click **Create**                                                                                                                                                                                                                                                                                                           |                                                                     |
| 10. Review your settings and configurations and click **Review + Create**                                                                                                                                                                                                                                                     |                                                                     |
| 11. Wait for the successful deployment                                                                                                                                                                                                                                                                                        |                                                                     |
| 12. Click **Go to resource**                                                                                                                                                                                                                                                                                                  |                                                                     |
| 13. Finally, go to **Overview** and share the **DNS Name** with the [RealmJoin Support](mailto:support@realmjoin.com)                                                                                                                                                                                                         | ![](/files/OgsoMhC6BPJLktamxfcb)                                    |

## KeyVault Storage of Secrets

RealmJoin will not store the secret in any proprietary storage but instead create an **Azure KeyVault Secret** to store it in a secure and auditable way. The KeyVault API is documented here:

<https://docs.microsoft.com/en-us/rest/api/keyvault/secrets/set-secret/set-secret>

The entry in KeyVault will be added with the Azure device ID as a key and the plain GUID as the secret value. See the following example:

![](/files/QIQv0sgMRl2c6liG9i5l)

![](/files/xTyknYXziBRYWZDeam6k)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.realmjoin.com/realmjoin-agent/realmjoin-client/local-admin-password-solution-laps/keyvault.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
