Creating and Configuring an App Service App
This lesson explains the settings used to create a web app and the configuration applied afterwards.
Learning outcomes
After completing this lesson, you will be able to:
- Describe the main settings for creating a web app.
- Explain app settings, connection strings and Key Vault references.
- Explain how managed identities are used by apps.
The creation wizard
In Create Web App, the Basics tab sets the subscription, resource group, name, publish model (Code or Container), runtime stack (such as .NET, Java, Node.js, Python or PHP, with a version), operating system, region and App Service plan (existing or new, with the pricing plan). The app's default host name is name.azurewebsites.net, or, with unique default hostname enabled, a name with a random hash and region, such as name-a6gqaeashthkhkeu.westeurope-01.azurewebsites.net, which prevents takeover of a dangling DNS name.
Later tabs configure Database creation, Deployment (continuous deployment with GitHub Actions and basic authentication settings), Networking (public access, VNet integration), Monitoring (Application Insights) and tags.
Creating a web app
Configuration after creation
The Environment variables page holds app settings, exposed to the code as environment variables, and connection strings. Values can be Key Vault references such as @Microsoft.KeyVault(SecretUri=...), resolved with the app's managed identity, so secrets are not stored in App Service. The Configuration page's general settings include the stack version, Always On (keeps the app loaded; Basic and above), HTTP version, web sockets, ARR affinity, FTP state and remote debugging.
The Identity page enables a system-assigned or user-assigned managed identity, which the app uses to reach Key Vault, Storage, SQL Database and other services with role assignments. Code is deployed by ZIP deploy (az webapp deploy), GitHub Actions, Azure Pipelines, local Git, FTP (discouraged) or by pointing the app at a container image.
The following diagram shows the managed identity, the key vault and the Key Vault reference that move a database password out of an app setting.

Where is it configured?
Removing secrets from configuration
A web app stores a database password in a plain-text app setting. The security team requires that the password be kept in Key Vault and rotated there, with no code changes and no credentials stored in the app. What should you configure?
Enable a system-assigned managed identity on the app, grant it the Key Vault Secrets User role on the vault, store the password as a secret and replace the app setting's value with a Key Vault reference. The app still reads the same environment variable, so no code changes are needed, and a reference without a version picks up rotated values. A connection string marked as a slot setting would still store the password in App Service.
How can an app setting read a secret from Key Vault without storing it in App Service?
Show answer
With a Key Vault reference, resolved by the app's managed identity.
Exam Tips
Remember for the exam
- Publish as code with a runtime stack, or as a container.
- Key Vault references in app settings keep secrets out of App Service.
- Always On needs Basic or higher.
- Use a managed identity for the app to reach other Azure services.