# Global Variables

Global variables are key-value pairs that can be used to store additional information for All Tenants. These are applied to templates in standards using the format %variablename%. If a tenant has a custom variable with the same name, the tenant's variable will take precedence.

These variables can be used in any type of template and will be replaced automatically.

Tenant custom variables can be set in the [Edit Tenant](/user-documentation/tenant/manage/edit.md#custom-variables) box, shown while editing a Tenant. Global variables are set on the [Global Variables](/user-documentation/tenant/administration/tenants/global-variables.md) tab under Tenant Administration > Administration > Tenants.

{% hint style="danger" %}
Given the differences in how various systems treat the variable name, we recommend using all lowercase when naming variables, e.g. variablename.
{% endhint %}

## Automatically Replaced Variables

The following variables will be automatically replaced by CIPP:

* `%initialdomain%`
* `%tenantfilter%`
* `%tenantid%`
* `%tenantname%`

## Reserved Variables

The following variables are reserved and will not be used:

* `%cippurl%`
* `%cippuserschema%`
* `%defaultdomain%`
* `%partnertenantid%`
* `%programdata%`
* `%programfiles%`
* `%programfiles(x86)%`
* `%samappid%`
* `%serial%`
* `%systemdrive%`
* `%systemroot%`
* `%temp%`
* `%userdomain%`
* `%username%`
* `%userprofile%`
* `%windir%`

{% hint style="info" %}
If you want to see how to combine Custom Variables and Tenant Groups to provide a way to "graduate" tenants through standards, see [Tutorials](/demos/tutorials.md#using-custom-variables-to-manage-standards-templates)
{% endhint %}

***

## Feature Requests / Ideas

We value your feedback and ideas. Please raise any [feature requests](https://github.com/KelvinTegelaar/CIPP/issues/new?template=feature.yml) on GitHub.


---

# 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.cipp.app/user-documentation/tenant/administration/tenants/global-variables.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.
