How and where to define an environment variable on Azure

I assume you are using Azure App Service (formerly known as Azure Websites).

To define your own environment variable, click to your site → All SettingsApplication settings:

Enter image description here

Add an app setting in the “App settings” section:

Enter image description here

You can verify the value from the debug console.

Going to https://{your site name}.scm.azurewebsites.net/DebugConsole:

Enter image description here

Leave a Comment