> For the complete documentation index, see [llms.txt](https://docs.instruqt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.instruqt.com/sandboxes/cloud-accounts/azure-subscriptions/azure-environment-variables.md).

# Azure Environment Variables

Adding an Azure subscription to your track also sets a list of [environment variables](https://en.wikipedia.org/wiki/Environment_variable) that you can use in commands and scripts:

<table data-header-hidden><thead><tr><th width="488.15548281505727">Environment variable</th><th>Description</th></tr></thead><tbody><tr><td>Environment variable</td><td>Description</td></tr><tr><td><code>INSTRUQT_AZURE_SUBSCRIPTIONS</code></td><td>A comma-separated list of project names that can be used to fill ${NAME} in the variables below</td></tr><tr><td><code>INSTRUQT_AZURE_SUBSCRIPTION_${NAME}_SUBSCRIPTION_NAME</code></td><td>The subscription display name</td></tr><tr><td><code>INSTRUQT_AZURE_SUBSCRIPTION_${NAME}_SUBSCRIPTION_ID</code></td><td>The subscription ID</td></tr><tr><td><code>INSTRUQT_AZURE_SUBSCRIPTION_${NAME}_USERNAME</code></td><td>The username that can be used to sign into the Azure portal</td></tr><tr><td><code>INSTRUQT_AZURE_SUBSCRIPTION_${NAME}_PASSWORD</code></td><td>The password that can be used to sign into the Azure portal</td></tr><tr><td><code>INSTRUQT_AZURE_SUBSCRIPTION_${NAME}_SPN_ID</code></td><td>The application ID for the service principal</td></tr><tr><td><code>INSTRUQT_AZURE_SUBSCRIPTION_${NAME}_SPN_PASSWORD</code></td><td>The password for the service principal</td></tr><tr><td><code>INSTRUQT_AZURE_SUBSCRIPTION_${NAME}_TENANT_ID</code></td><td>The tenant ID for this subscription</td></tr><tr><td><code>INSTRUQT_AZURE_SUBSCRIPTION_${NAME}_ADMIN_USERNAME</code></td><td>The username that can be used to sign into the Azure portal as the admin user</td></tr><tr><td><code>INSTRUQT_AZURE_SUBSCRIPTION_${NAME}_ADMIN_PASSWORD</code></td><td>The password that can be used to sign into the Azure portal as the admin user</td></tr><tr><td><code>INSTRUQT_AZURE_SUBSCRIPTION_${NAME}_ADMIN_SPN_ID</code></td><td>The application ID for the admin service principal</td></tr><tr><td><code>INSTRUQT_AZURE_SUBSCRIPTION_${NAME}_ADMIN_SPN_PASSWORD</code></td><td>The password for the admin service principal</td></tr></tbody></table>

### Example

This example shows the id of the Azure subscription from a terminal by using two environment variables. The value of the `INSTRUQT_AZURE_SUBSCRIPTIONS` environment variable is inserted in the `INSTRUQT_AZURE_SUBSCRIPTION_${NAME}_SUBSCRIPTION_ID` environment variable.

To follow along:

1. Start your Azure subscription track and start the first challenge.
2. Move over to the `Cloud CLI` terminal and enter the following command:

   ```xml
   eval echo "\${INSTRUQT_AZURE_SUBSCRIPTION_${INSTRUQT_AZURE_SUBSCRIPTIONS}_SUBSCRIPTION_ID}"
   ```

   ↳ The terminal shows the id of your Azure subscription.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.instruqt.com/sandboxes/cloud-accounts/azure-subscriptions/azure-environment-variables.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
