Tag: Azure Services

Extend security controls to hybrid and multicloud servers by using Azure Arc (SC-500 Exam Prep)

This post is a part of the "SC-500: Implementing End-to-End Security Controls for Cloud and AI Workloads" Exam Prep Hub.
This topic falls under these sections:
Secure compute (20–25%)
   --> Implement security for servers and virtual machines (VMs)
      --> Extend security controls to hybrid and multicloud servers by using Azure Arc


Note that there are 10 practice questions (with answers) at the end of each section to help you solidify your knowledge of the material. Also, there are 4 practice tests with 30 questions each available from the hub's main page below the exam topics section.

Overview

Organizations frequently operate servers in several locations:

  • Azure
  • On-premises datacenters
  • Branch offices
  • Edge locations
  • Other cloud providers, such as Amazon Web Services or Google Cloud
  • Virtualized environments such as VMware or Hyper-V

Managing security consistently across these environments can be difficult. Each platform may have different management tools, identity systems, monitoring solutions, patching processes, and security configurations.

Azure Arc-enabled servers extends Azure management, governance, monitoring, and security capabilities to physical servers and virtual machines running outside Azure. After a server is connected to Azure Arc, it is represented as an Azure resource and can be managed through Azure Resource Manager, the Azure portal, Azure CLI, Azure PowerShell, and Azure APIs.

For the SC-500 exam, the important concept is that Azure Arc does not move the server into Azure. Instead, it creates a secure management relationship between the external server and Azure so that Azure services can apply security controls to that server.


What Is Azure Arc-Enabled Servers?

Azure Arc-enabled servers is an Azure service that allows organizations to connect:

  • Windows physical servers
  • Linux physical servers
  • Windows virtual machines
  • Linux virtual machines

These machines can be hosted:

  • On-premises
  • In another cloud provider
  • In a datacenter
  • At an edge location
  • In a supported virtualized environment

When connected, each machine receives an Azure representation with an Azure resource ID. The resource can be placed in an Azure resource group and managed using Azure governance and security services.

Important distinction

Azure Arc-enabled servers is designed for servers outside Azure. It is not intended to provide Azure Arc management for ordinary Azure VMs, which are already native Azure resources.


Why Azure Arc Is Important for Security

Without Azure Arc, an organization may need separate security processes for each environment:

EnvironmentPossible management approach
AzureAzure portal and Defender for Cloud
On-premisesLocal management tools
AWSAWS security and management tools
GCPGCP security and management tools
EdgeCustom monitoring and administration

This can result in:

  • Inconsistent security baselines
  • Different patching schedules
  • Unmonitored servers
  • Excessive administrative permissions
  • Incomplete asset inventories
  • Delayed vulnerability remediation
  • Different compliance reports
  • Security gaps between cloud and datacenter environments

Azure Arc provides a common Azure control plane for supported external servers. This allows organizations to extend services such as:

  • Microsoft Defender for Cloud
  • Microsoft Defender for Servers
  • Microsoft Defender for Endpoint
  • Microsoft Sentinel
  • Azure Policy
  • Azure Machine Configuration
  • Azure Monitor
  • Azure Update Manager
  • Azure Automation
  • Azure Resource Graph

The exact capabilities depend on the service, operating system, region, licensing, and supported configuration.


Azure Arc Architecture

The Azure Connected Machine agent

To connect a server to Azure Arc, the Azure Connected Machine agent must be installed on the server.

The agent:

  1. Establishes the relationship between the server and the Azure subscription.
  2. Registers the machine as an Azure resource.
  3. Provides a managed identity for the machine.
  4. Communicates with Azure over outbound connections.
  5. Enables extensions and other Azure services.
  6. Helps evaluate or enforce configuration settings on the server.

The Azure representation becomes the control point through which authorized Azure users and services manage the connected machine.

Azure is the source of truth

Management actions are generally initiated against the Azure representation of the server. For example, an administrator may use Azure to:

  • Install a monitoring extension
  • Enable Microsoft Defender for Servers
  • Assign an Azure Policy
  • Apply a machine configuration
  • Enable update management
  • Configure an approved extension

The Azure control plane evaluates the request against applicable permissions and policies before the action is sent to the agent.

This is important because Azure RBAC and Azure Policy can govern who is allowed to perform management operations on the connected server.


How the Connected Machine Agent Communicates

Azure Arc-enabled servers primarily use outbound communication from the server to Azure.

Azure does not normally initiate inbound connections into the organization’s network to manage the server. Communication between the agent and Azure is encrypted using TLS.

Security benefits of outbound communication

This design can reduce the need to:

  • Open inbound management ports
  • Expose servers directly to the internet
  • Create inbound firewall rules for Azure management
  • Publish RDP or SSH endpoints

The organization must still allow the required outbound endpoints through its firewall or proxy.

Network planning considerations

Before onboarding a server, verify:

  • DNS resolution works.
  • The server can reach required Azure endpoints.
  • Outbound HTTPS traffic is permitted.
  • Proxy settings are configured if required.
  • TLS inspection is compatible with the agent and extensions.
  • Extensions have access to any additional endpoints they require.

Some extensions have their own network requirements beyond the base Azure Arc agent requirements.


Public and Private Connectivity

Azure Arc-enabled servers can use public Azure endpoints or supported private endpoint configurations.

Public endpoint connectivity

With public connectivity:

  • The server makes outbound connections to Azure.
  • Traffic is encrypted.
  • Required Azure endpoints must be allowed through the organization’s firewall or proxy.

This is often the simplest deployment model.

Private endpoint connectivity

Private endpoints can allow Azure Arc traffic to travel through private connectivity such as:

  • ExpressRoute
  • Site-to-site VPN

Private endpoints can provide more granular control over which machines are allowed to communicate with Azure Arc services.

However, private endpoints do not eliminate every public endpoint requirement. For example, Microsoft Entra ID does not provide a private endpoint in the same way as Azure Arc services, and some extensions may still require public connectivity.

Important limitation

Using a private endpoint for Azure Arc does not mean that every remote-management method becomes private. For example, SSH and Windows Admin Center access have separate requirements and are not automatically provided through an Azure Arc private endpoint.


Azure Arc and Microsoft Defender for Cloud

Azure Arc is commonly used to onboard non-Azure servers into Microsoft Defender for Cloud.

The general process is:

  1. Connect the external server to Azure Arc.
  2. Register the server in an Azure subscription.
  3. Enable the appropriate Microsoft Defender for Cloud plan.
  4. Deploy required security agents or extensions.
  5. Review recommendations, alerts, and security posture.
  6. Remediate identified issues.

Once connected to Azure Arc and covered by the appropriate Defender for Servers plan, an external server can appear in Defender for Cloud alongside native Azure resources.

Security capabilities that may be extended

Depending on licensing and configuration, organizations can use Defender for Cloud to provide:

  • Security posture management
  • Security recommendations
  • Vulnerability assessment
  • Threat detection
  • Microsoft Defender for Endpoint integration
  • File Integrity Monitoring
  • Just-in-time VM access where supported
  • Regulatory compliance assessments
  • Security alerts
  • Cloud workload protection

Not every Defender capability is automatically available merely because a server is connected to Azure Arc. The required Defender plan and supporting agents or extensions must be configured.


Azure Arc and Microsoft Defender for Servers

Microsoft Defender for Servers extends security protection to supported servers outside Azure when they are connected through Azure Arc.

Defender for Servers Plan 1

Plan 1 provides core server protection capabilities, including Microsoft Defender for Endpoint integration where supported.

Defender for Servers Plan 2

Plan 2 includes additional capabilities, such as:

  • File Integrity Monitoring
  • Just-in-time VM access
  • Additional vulnerability and security capabilities
  • Additional cloud workload protection features

The exact feature set should always be checked against the current service configuration and licensing model.

Exam distinction

Azure Arc provides the connection and Azure resource representation.

Microsoft Defender for Servers provides the server security capabilities.

They are related, but they are not the same service.


Azure Arc and Microsoft Defender for Endpoint

Microsoft Defender for Endpoint can provide endpoint protection and detection capabilities for supported Arc-enabled servers.

Capabilities may include:

  • Endpoint detection and response
  • Threat detection
  • Vulnerability management
  • Security monitoring
  • Investigation support
  • Automated response capabilities, depending on licensing and configuration

Azure Arc helps Defender for Cloud identify and manage the external server, while Defender for Endpoint provides endpoint-level security telemetry and protection.


Azure Arc and Microsoft Sentinel

Microsoft Sentinel is a cloud-native security information and event management and security orchestration, automation, and response solution.

Azure Arc can help onboard hybrid and multicloud servers so that their security events can be collected and analyzed in Microsoft Sentinel.

A typical architecture may include:

  1. Azure Arc connects the server to Azure.
  2. A supported monitoring or security agent is installed.
  3. Server logs and security events are collected.
  4. Data is sent to a Log Analytics workspace.
  5. Microsoft Sentinel analyzes the data.
  6. Analytics rules detect suspicious activity.
  7. Incidents, automation rules, and playbooks support response.

This provides a centralized view of security events across Azure, on-premises, and other cloud environments.

Example

An organization has:

  • Windows servers in Azure
  • Linux servers in an on-premises datacenter
  • AWS virtual machines
  • A central Microsoft Sentinel workspace

Azure Arc can provide the Azure connection for the non-Azure servers. Microsoft Sentinel can then correlate events from all environments to detect activity that might not be suspicious when viewed in isolation.


Azure Arc and Azure Policy

Azure Policy can be used to govern Arc-enabled servers.

Policy assignments can evaluate:

  • Whether required extensions are installed
  • Whether security agents are deployed
  • Whether specific configurations are present
  • Whether servers meet organizational standards
  • Whether resources are located in approved resource groups
  • Whether required tags or metadata are present

Azure Policy can be assigned at scopes such as:

  • Management group
  • Subscription
  • Resource group
  • Individual resource

Example policy requirements

An organization might require that all Arc-enabled production servers:

  • Have Microsoft Defender for Endpoint installed
  • Send security data to an approved Log Analytics workspace
  • Use a specific security configuration
  • Have required tags
  • Belong to an approved resource group
  • Use a supported operating system version

Azure Policy helps maintain consistent governance across servers that otherwise run in different environments.


Azure Machine Configuration

Azure Machine Configuration, previously associated with Guest Configuration, can audit or enforce settings inside Arc-enabled servers.

It can be used to evaluate operating-system and machine-level settings, such as:

  • Password policies
  • Security options
  • Registry settings
  • File configurations
  • Services
  • Installed software
  • Operating-system configuration
  • Compliance with organizational baselines

Azure Policy versus Machine Configuration

CapabilityAzure PolicyAzure Machine Configuration
Primary focusAzure resource governanceSettings inside the guest operating system
ExampleRequire a security extensionRequire a specific password policy
ScopeAzure resource hierarchyMachine configuration
Typical resultResource compliance stateGuest configuration compliance state

Azure Policy can assign or evaluate machine configuration policies against Arc-enabled servers.


Azure Arc Extensions

Extensions allow Azure services and other supported capabilities to be installed or configured on an Arc-enabled server.

Examples include extensions for:

  • Monitoring
  • Security
  • Configuration
  • Automation
  • Update management
  • Custom scripts
  • Dependency analysis

Security considerations for extensions

Extensions can perform powerful operations on the server. Therefore, organizations should:

  • Limit who can install extensions.
  • Use extension allowlists where appropriate.
  • Review extension publishers and functionality.
  • Keep extensions updated.
  • Remove unnecessary extensions.
  • Monitor extension installation and configuration changes.
  • Apply Azure Policy to control extension deployment.

A compromised or overly privileged account could potentially use an extension to make changes on the server. For this reason, extension management should be treated as a privileged operation.


Azure Arc Managed Identity

The Connected Machine agent provides a managed identity for the connected server.

A managed identity can allow the server or supported applications to authenticate to Azure services without storing credentials such as:

  • Passwords
  • Client secrets
  • Certificates
  • Access keys

For example, a supported application running on an Arc-enabled server may use its managed identity to access an Azure resource according to its assigned permissions.

Benefits

Managed identities can:

  • Reduce credential storage
  • Reduce secret rotation requirements
  • Support Azure RBAC
  • Improve auditability
  • Reduce the risk of exposed credentials

Least-privilege requirement

A managed identity should receive only the permissions required for its tasks. Assigning broad roles such as Owner or Contributor unnecessarily increases risk.


Azure Arc Onboarding Methods

The onboarding process generally includes:

  1. Select the Azure subscription and resource group.
  2. Select the Azure region.
  3. Prepare the server.
  4. Install the Azure Connected Machine agent.
  5. Authenticate the onboarding operation.
  6. Register the server with Azure Arc.
  7. Verify the connection.
  8. Apply security services and policies.

Authentication options

Depending on the deployment method, onboarding may use:

  • Interactive user authentication
  • A service principal
  • Other supported authentication methods

Service principal security

When using a service principal for onboarding at scale:

  • Grant only the required permissions.
  • Avoid broad subscription-wide roles where possible.
  • Protect client secrets.
  • Rotate credentials regularly.
  • Prefer certificate-based or managed identity approaches when supported.
  • Do not place secrets directly in scripts or source-control repositories.
  • Restrict who can create and use onboarding credentials.

Microsoft identifies protection and rotation of onboarding credentials as a customer responsibility.


Organizing Arc-Enabled Servers

The subscription, resource group, and management-group hierarchy affects who can manage connected servers.

A recommended design is to organize servers according to:

  • Environment
  • Business unit
  • Data sensitivity
  • Administrative ownership
  • Compliance requirements
  • Production versus nonproduction status
  • Geographic or regulatory boundaries

Example structure

Management Group
└── Hybrid Security
├── Production Servers Subscription
│ ├── Critical Servers Resource Group
│ └── Application Servers Resource Group
└── Nonproduction Servers Subscription
├── Development Resource Group
└── Testing Resource Group

This structure allows administrators to apply different:

  • RBAC assignments
  • Azure Policy assignments
  • Defender plans
  • Monitoring configurations
  • Compliance requirements

Why resource placement matters

Azure RBAC permissions inherited from a subscription or resource group can grant users access to connected servers. Therefore, placing highly sensitive servers in a broadly administered resource group may unintentionally expand administrative access.


Protecting Tier 0 and Highly Sensitive Servers

Tier 0 assets may include:

  • Active Directory domain controllers
  • Certificate authorities
  • Privileged identity infrastructure
  • Highly sensitive application servers
  • Systems that control other security systems

Connecting these systems to Azure Arc can provide valuable security visibility, but it also introduces an additional management control plane.

Recommended precautions

For sensitive servers:

  • Use a dedicated subscription where practical.
  • Minimize persistent administrators.
  • Review inherited RBAC permissions.
  • Review management-group policies.
  • Restrict extension deployment.
  • Disable unnecessary agent functionality.
  • Monitor all management operations.
  • Keep the Connected Machine agent updated.
  • Ensure onboarding credentials are protected.
  • Apply only required security and management services.

Microsoft specifically recommends extra care when connecting Tier 0 assets because subscription and management-group administrators may be able to grant themselves access to the Arc-enabled server resource.


Agent and Extension Updates

The Connected Machine agent and its extensions are security-sensitive components.

Organizations should establish processes to:

  • Monitor agent versions
  • Apply agent updates
  • Update extensions
  • Remove obsolete extensions
  • Test updates before broad deployment
  • Monitor failed updates
  • Confirm that security agents remain operational

Keeping the operating system updated remains the customer’s responsibility. Azure Arc does not automatically make the underlying operating system secure.

Azure Update Manager or other supported update-management capabilities can help coordinate operating-system updates across Arc-enabled servers.


Shared Responsibility Model

Security for Arc-enabled servers is shared between Microsoft and the customer.

Microsoft responsibilities

Microsoft is responsible for:

  • Securing the Azure service
  • Protecting system metadata stored in Azure
  • Operating the Azure management platform
  • Publishing agent updates
  • Documenting security features and limitations

Customer responsibilities

The customer is responsible for:

  • Securing the physical or virtual server
  • Managing operating-system security
  • Managing RBAC access
  • Protecting onboarding credentials
  • Updating the agent and extensions
  • Configuring network access
  • Applying security policies
  • Reviewing security recommendations
  • Determining regulatory compliance
  • Securing the infrastructure hosting the server

Connecting a server to Azure Arc does not transfer responsibility for the guest operating system or underlying infrastructure to Microsoft.


Common Security Mistakes

Mistake 1: Treating Azure Arc as an endpoint-protection product

Azure Arc provides management connectivity and resource representation. Endpoint protection normally requires Defender for Endpoint or another supported security solution.

Mistake 2: Assuming onboarding automatically enables every Defender capability

The appropriate Defender plan, agents, extensions, and configuration are still required.

Mistake 3: Assigning excessive RBAC permissions

Subscription and resource-group administrators may gain broad control over Arc-enabled servers. Use least privilege and carefully designed resource groups.

Mistake 4: Storing service principal secrets in scripts

Onboarding scripts containing credentials can expose the organization to credential theft. Use secure credential handling and rotate credentials regularly.

Mistake 5: Allowing unrestricted extension installation

Extensions can perform privileged actions. Control extension deployment and use allowlists when appropriate.

Mistake 6: Assuming private endpoints remove all network requirements

Private endpoints may reduce exposure, but Microsoft Entra ID and some extensions may still require access to other endpoints.

Mistake 7: Ignoring the underlying server

Azure Arc does not replace:

  • Operating-system patching
  • Local firewall configuration
  • Endpoint protection
  • Application security
  • Backup
  • Identity hardening
  • Physical security
  • Network segmentation

Example: Securing an On-Premises Linux Server

An organization has an on-premises Linux server hosting a critical application.

The organization wants to:

  • Register the server in Azure
  • Apply a security baseline
  • Monitor security events
  • Detect vulnerabilities
  • Centralize security alerts
  • Restrict administrative access

A possible implementation is:

  1. Install the Azure Connected Machine agent.
  2. Register the server in an approved Azure subscription and resource group.
  3. Enable Microsoft Defender for Servers Plan 2 if required.
  4. Deploy the required Defender for Endpoint and monitoring components.
  5. Connect the relevant logs to Microsoft Sentinel.
  6. Assign Azure Policy for required configuration.
  7. Apply Azure Machine Configuration policies.
  8. Review Defender for Cloud recommendations.
  9. Remediate vulnerabilities and configuration issues.
  10. Monitor agent and extension health.
  11. Review RBAC assignments regularly.
  12. Protect the onboarding credentials and update processes.

This design extends Azure security management without moving the Linux server into Azure.


Example: Securing AWS Virtual Machines

An organization runs application servers in AWS but wants centralized security monitoring in Azure.

A typical approach is:

  1. Connect the AWS environment to Microsoft Defender for Cloud using the supported multicloud connector.
  2. Allow the connector to deploy or onboard the required Azure Arc components.
  3. Verify that the AWS machines appear as Arc-enabled servers.
  4. Enable the appropriate Defender for Servers plan.
  5. Deploy required security agents or extensions.
  6. Review Defender for Cloud recommendations and alerts.
  7. Send relevant security events to Microsoft Sentinel.
  8. Use Azure Policy and machine configuration to evaluate required settings.

The multicloud connector can simplify onboarding by handling the Azure Arc deployment for supported AWS and GCP scenarios.


Exam-Focused Comparison

Service or featurePrimary purpose
Azure Arc-enabled serversConnect and manage external servers through Azure
Azure Connected Machine agentEstablishes and maintains the server-to-Azure relationship
Microsoft Defender for CloudCentralized security posture management and workload protection
Microsoft Defender for ServersSecurity protection for supported servers
Microsoft Defender for EndpointEndpoint detection, response, and vulnerability capabilities
Microsoft SentinelCentralized security event analysis and response
Azure PolicyGovernance and compliance at the Azure resource level
Azure Machine ConfigurationAudit or enforce settings inside the guest operating system
Azure MonitorMonitoring, metrics, and logs
Azure Update ManagerUpdate management across supported machines
Azure RBACControls who can manage Arc-enabled resources

Key Exam Takeaways

Remember these points for the SC-500 exam:

  • Azure Arc-enabled servers extends Azure management and security capabilities to servers outside Azure.
  • The Azure Connected Machine agent must be installed on the external server.
  • An Arc-enabled server becomes an Azure resource with an Azure resource ID.
  • Azure Arc is not the same as Microsoft Defender for Cloud.
  • Defender for Cloud and Defender for Servers provide security capabilities after the appropriate plans and agents are configured.
  • Microsoft Defender for Endpoint provides endpoint protection and detection capabilities.
  • Microsoft Sentinel can collect and correlate security events from Arc-enabled servers.
  • Azure Policy can govern Arc-enabled server resources.
  • Azure Machine Configuration evaluates or enforces settings inside the guest operating system.
  • Arc communication is primarily outbound from the server to Azure and is encrypted using TLS.
  • Private endpoints are optional and do not eliminate every public endpoint requirement.
  • Onboarding credentials and service principal secrets must be protected and rotated.
  • Extensions are powerful and should be controlled.
  • RBAC permissions inherited from subscriptions and resource groups can affect access to connected servers.
  • Tier 0 servers require additional planning and restrictive management controls.
  • Azure Arc does not replace operating-system security, endpoint protection, patching, or network security.

Practice Exam Questions

Question 1

An organization runs Linux servers in an on-premises datacenter and wants to manage them through Azure Resource Manager without moving them into Azure.

Which service should the organization use?

A. Azure Arc-enabled servers
B. Azure Bastion
C. Azure Virtual Desktop
D. Azure Load Balancer

Answer: A

Explanation: Azure Arc-enabled servers represents supported physical and virtual servers outside Azure as Azure resources that can be managed through Azure Resource Manager.


Question 2

What component must be installed on an on-premises server before it can be connected to Azure Arc-enabled servers?

A. Microsoft Sentinel agent only
B. Azure Connected Machine agent
C. Azure Application Gateway agent
D. Azure Storage Explorer

Answer: B

Explanation: The Azure Connected Machine agent establishes the relationship between the external server and the Azure subscription.


Question 3

Which statement best describes the normal network communication model for Azure Arc-enabled servers?

A. Azure requires inbound RDP access to every connected server
B. Azure connects to the server through an inbound SSH tunnel by default
C. The Connected Machine agent primarily establishes outbound encrypted connections to Azure
D. The server must expose all management ports to the public internet

Answer: C

Explanation: Azure Arc primarily uses outbound communication from the server to Azure. The communication is encrypted using TLS, reducing the need for inbound management access.


Question 4

An organization wants to evaluate whether Arc-enabled servers comply with a required password policy and operating-system security configuration.

Which capability is most appropriate?

A. Azure Load Balancer health probes
B. Azure Resource Locks
C. Azure Machine Configuration
D. Azure Traffic Manager

Answer: C

Explanation: Azure Machine Configuration evaluates or enforces settings inside the guest operating system, such as password policies and security configuration.


Question 5

An organization connects its on-premises servers to Azure Arc and then enables Microsoft Defender for Servers Plan 2.

Which additional capability may be available through Plan 2?

A. File Integrity Monitoring and just-in-time VM access
B. Automatic conversion of the server into an Azure VM
C. Replacement of the server’s operating system
D. Automatic creation of a public IP address for the server

Answer: A

Explanation: Defender for Servers Plan 2 includes additional capabilities such as File Integrity Monitoring and just-in-time VM access, subject to supported configurations.


Question 6

A security team wants to centralize and correlate security events from Azure VMs, on-premises servers, and AWS virtual machines.

Which service should be used for centralized security information and event management?

A. Azure DNS
B. Microsoft Sentinel
C. Azure Resource Manager locks
D. Azure Container Registry

Answer: B

Explanation: Microsoft Sentinel can collect, analyze, correlate, and respond to security events from multiple environments, including Arc-enabled servers.


Question 7

An administrator wants to prevent users from installing unauthorized extensions on Arc-enabled servers.

Which control should be considered?

A. Azure Policy and Azure Arc extension controls
B. Azure CDN caching rules
C. Azure Front Door routing rules
D. Azure Storage lifecycle management

Answer: A

Explanation: Extensions can perform powerful operations on connected servers. Azure Policy and available Arc agent security controls can help restrict or govern extension deployment.


Question 8

An organization is onboarding hundreds of servers using a service principal.

Which action best protects the onboarding process?

A. Assign the service principal the Owner role on every subscription
B. Store the client secret in a publicly accessible script
C. Grant only required permissions and protect and rotate the credentials
D. Disable Azure RBAC after onboarding is complete

Answer: C

Explanation: Onboarding credentials should be protected, granted only the permissions required, and rotated regularly. Excessive permissions and exposed secrets create significant security risks.


Question 9

A company wants to isolate highly sensitive domain controllers that are connected through Azure Arc from ordinary application servers.

Which design is most appropriate?

A. Place all servers in one broadly administered resource group
B. Use a dedicated subscription or tightly controlled resource hierarchy with minimal persistent administrators
C. Give every administrator the Owner role
D. Disable all Azure Policy assignments

Answer: B

Explanation: Tier 0 assets require careful control of inherited permissions and management access. A dedicated subscription or tightly controlled hierarchy can reduce the number of users and policies able to manage the servers.


Question 10

Which statement correctly distinguishes Azure Arc-enabled servers from Microsoft Defender for Cloud?

A. Azure Arc provides endpoint antivirus, while Defender for Cloud only registers resources
B. Azure Arc connects and represents external servers in Azure, while Defender for Cloud provides security posture and workload protection capabilities
C. Azure Arc is used only for Azure VMs, while Defender for Cloud is used only for on-premises servers
D. Azure Arc replaces Azure Policy and Microsoft Sentinel

Answer: B

Explanation: Azure Arc provides the connection and Azure resource representation for supported external servers. Defender for Cloud provides security posture management and workload protection capabilities after the appropriate plans and configurations are enabled.


Go to the SC-500 Exam Prep Hub main page

Configure and deploy function apps (AI-200 Exam Prep)

This post is a part of the AI-200: Developing AI Cloud Solutions on Azure  Exam Prep Hub.
This topic falls under these sections:
Connect to and consume Azure services (20–25%)
   --> Develop and implement Azure Functions
      --> Configure and deploy function apps


Note that there are 10 practice questions (with answers) at the end of each section to help you solidify your knowledge of the material. Also, there are 4 practice tests with 30 questions each available from the hub's main page below the exam topics section.

Overview

Azure Functions is a serverless compute service that enables developers to execute application code in response to events without managing the underlying server infrastructure.

For the AI-200: Developing AI Cloud Solutions on Azure exam, you should understand how to configure and deploy function apps, including:

  • Function app hosting plans
  • Function app configuration
  • Application settings
  • Runtime and operating-system configuration
  • Deployment methods
  • Zip deployment
  • Running functions from deployment packages
  • Deployment slots
  • Flex Consumption deployment
  • Continuous deployment
  • Configuration considerations for production
  • Common deployment problems and troubleshooting

The key exam skill is not simply knowing how to create a function app. You need to understand why you would choose a particular hosting or deployment approach for a given scenario.


1. What Is an Azure Function App?

An Azure Function is a piece of code that executes in response to a trigger.

A function app is the Azure resource that provides the execution environment for one or more functions.

For example, an AI application might contain functions that:

  1. Receive an HTTP request.
  2. Process a message from Azure Service Bus.
  3. Respond to an Event Grid event.
  4. Read a file uploaded to Azure Blob Storage.
  5. Process a timer event.
  6. Write results to a database.

The function app provides the common configuration and hosting environment for these functions.

Conceptually:

                    Azure Function App
                           |
          +----------------+----------------+
          |                |                |
      HTTP Function   Queue Function   Timer Function
          |                |                |
       REST API       AI Processing    Scheduled Job

Functions within the same function app generally share:

  • Runtime configuration
  • Application settings
  • Deployment configuration
  • Hosting resources
  • Some networking configuration
  • Monitoring configuration
  • Authentication configuration

Therefore, functions that have significantly different configuration or scaling requirements may be better placed in separate function apps.


2. Function App Hosting Plans

One of the most important concepts for AI-200 is understanding that the hosting plan affects scaling, cost, networking, deployment, and available features.

Current Azure Functions hosting options include:

  • Consumption
  • Flex Consumption
  • Elastic Premium
  • Dedicated/App Service
  • Azure Container Apps

The exact capabilities differ between plans.

Consumption Plan

The traditional Consumption plan is designed around serverless execution.

You generally pay based on function execution and resource consumption rather than maintaining dedicated compute capacity.

Characteristics include:

  • Automatic scaling
  • Serverless execution model
  • Consumption-based pricing
  • Potential cold starts
  • Limited control compared with Premium or Dedicated plans

The traditional Consumption plan should not be confused with Flex Consumption, which is the newer serverless option.


3. Flex Consumption

Flex Consumption is a newer Azure Functions hosting plan and is particularly important for current Azure development.

It is:

  • Linux-based
  • Serverless
  • Dynamically scalable
  • Consumption-based
  • Designed to provide more configuration flexibility than the traditional Consumption plan

Microsoft currently describes Flex Consumption as the recommended serverless hosting plan for Azure Functions.

Flex Consumption provides capabilities such as:

  • Configurable instance memory
  • Fast or large-scale-out options
  • Private networking
  • Always-ready instances for reducing cold starts
  • Support for deployment packages
  • Rolling updates for zero-downtime deployments

One particularly important exam distinction is that Flex Consumption uses a different deployment model from traditional Consumption.

Flex Consumption uses One Deploy as its deployment technology.

Important distinction

Do not assume:

“Zip deployment is the standard deployment method for every Functions hosting plan.”

That is no longer correct.

For example:

Hosting planDeployment approach
Flex ConsumptionOne Deploy
ConsumptionZip deploy and other supported methods
Elastic PremiumZip deploy and other supported methods
DedicatedZip deploy and other supported methods
Container AppsContainer-based deployment

4. Elastic Premium Plan

The Elastic Premium plan provides more control and capabilities than Consumption-based hosting.

It is useful when applications require features such as:

  • More predictable performance
  • Larger compute resources
  • VNet integration
  • Reduced cold-start impact
  • Longer-running workloads
  • More control over scaling

Premium plans also support deployment slots.

This can be useful when deploying AI applications where a new version needs to be tested before being exposed to production users.


5. Dedicated/App Service Plan

A Function App can also run on a dedicated App Service plan.

In this model, the application runs on dedicated App Service compute.

This can be appropriate when:

  • You already have App Service infrastructure.
  • Predictable compute capacity is required.
  • You want to run functions alongside other App Service workloads.
  • The workload does not fit the serverless consumption model.

The tradeoff is that you are paying for allocated compute capacity rather than relying exclusively on consumption-based serverless execution.


6. Azure Container Apps

Azure Functions can also be hosted in Azure Container Apps.

This approach is particularly useful when:

  • You want containerized Functions.
  • You need container-specific capabilities.
  • You want Azure Container Apps scaling and infrastructure.
  • Your application architecture already uses containers.

This is different from simply deploying function source code to a normal Function App.


7. Choosing the Hosting Plan

For the exam, think in terms of requirements.

RequirementLikely consideration
Serverless executionConsumption or Flex Consumption
Modern recommended serverless optionFlex Consumption
Private networking with serverless modelFlex Consumption
Reduce cold startsFlex Consumption/Premium
Predictable dedicated computeDedicated
Advanced scaling/performancePremium
Containerized FunctionsAzure Container Apps
Deployment slotsConsumption, Premium, Dedicated
Zero-downtime Flex deploymentRolling updates
Test deployment before productionDeployment slots where supported

The exam may give you a scenario and ask you to select the most appropriate hosting model.


8. Function App Configuration

After selecting the hosting environment, you need to configure the function app.

Important configuration areas include:

  • Runtime
  • Operating system
  • Application settings
  • Connection strings
  • Authentication
  • Networking
  • Storage
  • Monitoring
  • Deployment configuration

The configuration determines how the Functions runtime executes your code and accesses external services.


9. Application Settings

Application settings are environment variables made available to your function application.

They are commonly used for configuration such as:

FUNCTIONS_WORKER_RUNTIME
AzureWebJobsStorage
APPLICATIONINSIGHTS_CONNECTION_STRING
SERVICE_BUS_CONNECTION
DATABASE_CONNECTION
OPENAI_ENDPOINT

For example, an application might use:

SERVICE_BUS_CONNECTION

instead of embedding a Service Bus connection string directly in source code.

The application reads the setting at runtime.

This allows the same application code to be deployed into different environments:

Development
|
v
SERVICE_BUS_CONNECTION = Dev connection
Test
|
v
SERVICE_BUS_CONNECTION = Test connection
Production
|
v
SERVICE_BUS_CONNECTION = Production connection

This is a fundamental cloud-development practice.


10. Never Hard-Code Secrets

A common mistake is placing credentials directly into source code.

Avoid:

connectionString = "Endpoint=sb://...;SharedAccessKey=..."

Instead, use configuration and preferably a secure secret-management solution such as Azure Key Vault.

For example:

Function App
|
v
Managed Identity
|
v
Azure Key Vault
|
v
Secret

This allows the code to remain unchanged when credentials change.


11. Function App Settings and Restarts

Changes to function app settings can cause the application to restart.

This matters in production environments.

If an application setting is changed, developers should understand that the change isn’t necessarily a completely isolated configuration update with no runtime impact.

For production applications, configuration changes should therefore be managed carefully.


12. Runtime Configuration

A Function App must use a compatible Functions runtime and language stack.

Examples include:

  • .NET
  • Java
  • JavaScript/Node.js
  • Python
  • PowerShell

The runtime configuration must match the application being deployed.

For example, a Python function app should not be configured as a .NET runtime application.


13. The host.json File

The host.json file contains configuration settings that apply to the entire function app.

Examples of configuration areas include:

  • Logging
  • Extension behavior
  • Retry policies
  • Concurrency
  • Durable Functions behavior
  • HTTP configuration

A simplified example:

{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true
}
}
}
}

The host.json file is different from application settings.

host.json

Controls Functions host behavior.

Application settings

Provide environment-specific configuration and values to the application.

Understanding this distinction is important.


14. Deployment Methods

Azure Functions supports multiple deployment technologies.

The appropriate method depends on:

  • Hosting plan
  • Operating system
  • Development workflow
  • CI/CD requirements
  • Application architecture

Current deployment technologies include:

  • One Deploy
  • Zip deploy
  • External package URL
  • Docker/container deployment
  • Source control
  • Local Git
  • FTPS
  • In-portal editing

Not every method is supported for every hosting plan.


15. Zip Deployment

Zip deployment packages the function app into a .zip file and deploys it to Azure.

For Consumption, Elastic Premium, and Dedicated plans, zip deployment is the default and recommended deployment technology.

For example:

Function Project
|
v
Build
|
v
function.zip
|
v
Azure Function App

A ZIP package must contain the application files in the expected structure.

One important requirement is that host.json must be located at the root of the package.

Incorrect:

function.zip
|
+-- my-function-project
|
+-- host.json

Correct:

function.zip
|
+-- host.json
+-- Function1
+-- Function2
+-- requirements.txt

If the parent project directory is accidentally included, Azure Functions may not find the expected files.


16. Deploying with Azure CLI

For supported hosting plans, Azure CLI can be used to perform ZIP deployment.

A typical command is:

az functionapp deployment source config-zip \
-g <resource-group> \
-n <function-app-name> \
--src <zip-file>

This uploads the ZIP package to the Function App.

The important exam concept is not memorizing every CLI parameter.

Instead, recognize:

config-zip is associated with ZIP deployment for supported Function App hosting plans.


17. Run From Package

Azure Functions can also run directly from a deployment package instead of extracting the application files into the normal application directory.

For supported plans, this can be enabled with:

WEBSITE_RUN_FROM_PACKAGE=1

When enabled, the deployment package is mounted as a read-only filesystem.

Advantages include:

  • Reduced file-copy problems
  • More predictable deployments
  • Improved deployment performance
  • Verification of the exact package being executed
  • Reduced cold-start impact in some scenarios

18. Important Flex Consumption Deployment Difference

One of the most important current exam distinctions is:

Flex Consumption does not use traditional Zip Deploy.

Flex Consumption uses One Deploy.

With One Deploy, the application is packaged and uploaded to a deployment storage container. The Function App retrieves the package and runs the application from it.

Therefore:

Scenario:

You create a new Function App using the Flex Consumption plan. You want to deploy the application using the supported deployment mechanism.

The appropriate answer should point toward:

One Deploy, rather than traditional Zip Deploy.


19. Deployment Slots

Deployment slots allow supported Function Apps to have multiple environments associated with the same application.

For example:

Function App
|
+-- Production
|
+-- Staging

You can deploy a new version to the staging slot, test it, and then swap it with production.

The general process is:

Development
|
v
Staging Slot
|
Test
|
v
Swap
|
v
Production

This reduces the risk of deploying an untested version directly to production.


20. Deployment Slots and Hosting Plans

Deployment slots are not available on every hosting model.

Current slot support includes:

Hosting optionDeployment slots
ConsumptionProduction + 1 slot
Flex ConsumptionNot currently supported
PremiumProduction + multiple slots
DedicatedProduction + multiple slots
Container AppsUses revisions rather than Functions deployment slots

This is an excellent area for scenario-based exam questions.

Example

A developer wants to deploy a new version to staging and swap it into production. The Function App uses Flex Consumption.

The traditional deployment-slot solution is not available.

Flex Consumption instead supports zero-downtime deployment through its site update strategies, including rolling updates.


21. Continuous Deployment

For production applications, deployment is often automated through CI/CD.

A typical pipeline looks like:

Developer
|
v
Source Repository
|
v
Build
|
v
Automated Tests
|
v
Package
|
v
Azure Function App

Possible tools include:

  • GitHub Actions
  • Azure Pipelines
  • Azure CLI
  • Azure Functions Core Tools
  • Visual Studio Code
  • Infrastructure-as-code tools

The goal is to make deployments:

  • Repeatable
  • Automated
  • Testable
  • Auditable
  • Consistent

22. Development vs. Production Deployment

The deployment method should reflect the environment.

Development

A developer may deploy directly from:

  • Visual Studio Code
  • Azure Functions Core Tools
  • Azure CLI

This is convenient for rapid development.

Production

Production deployments should generally use an automated CI/CD process.

A production pipeline might:

  1. Build the application.
  2. Install dependencies.
  3. Run unit tests.
  4. Run security checks.
  5. Package the application.
  6. Deploy to a staging environment.
  7. Run validation tests.
  8. Promote the application to production.

23. Configuration by Environment

A common architecture is to keep application code identical across environments while changing configuration.

For example:

                Same Code
                    |
       +------------+------------+
       |            |            |
       v            v            v
 Development       Test      Production
       |            |            |
       v            v            v
 Dev settings    Test settings   Prod settings

This is preferable to maintaining three separate codebases.

Environment-specific values should be supplied through:

  • Application settings
  • Key Vault
  • Managed identity
  • App Configuration
  • CI/CD variables

24. Infrastructure as Code

Function Apps can also be deployed using infrastructure-as-code technologies such as:

  • Bicep
  • ARM templates
  • Terraform

This allows the application infrastructure to be described declaratively.

For example:

Infrastructure Definition
|
v
Resource Group
|
+-----+-----+
| |
v v
Function App Storage
|
v
Application Insights

Infrastructure as code is especially useful when deploying consistent development, test, and production environments.


25. Function App Storage

Azure Functions generally requires an associated storage account for runtime operations.

The storage account may be used for Functions platform requirements such as:

  • Host state
  • Trigger management
  • Function keys
  • Other runtime-related data

The exact storage requirements vary depending on the hosting model.

This is especially important when designing secure or network-restricted applications.


26. Monitoring Configuration

Production Function Apps should generally be integrated with Application Insights/Azure Monitor.

Monitoring can provide information about:

  • Requests
  • Exceptions
  • Dependencies
  • Performance
  • Traces
  • Availability
  • Failures

An application can then be diagnosed using telemetry rather than relying exclusively on application output.

For an AI application, this can be particularly valuable.

For example:

HTTP Request
|
v
Azure Function
|
+----> Azure OpenAI
|
+----> Cosmos DB
|
+----> Service Bus
|
v
Application Insights

Telemetry can help identify whether a slow request is caused by the function itself or by a downstream dependency.


27. Networking Considerations

Function Apps may need to communicate with resources that are not publicly accessible.

Examples include:

  • Azure SQL
  • Azure Database for PostgreSQL
  • Azure Storage
  • Azure Key Vault
  • Cosmos DB
  • Internal APIs

Depending on the hosting plan and architecture, networking features such as VNet integration and private endpoints can be used.

This is one reason hosting-plan selection matters.

A requirement such as:

“The serverless application must access resources through a private network.”

should cause you to carefully consider whether the selected hosting plan supports the required networking capabilities.

Flex Consumption specifically provides private networking capabilities.


28. Common Deployment Problems

Understanding deployment failures is useful for both real-world development and AI-200.

Problem 1: Incorrect ZIP structure

The package does not contain host.json at the root.

Result: Functions may not be discovered correctly.

Solution: Package the contents of the application directory rather than the parent directory.


Problem 2: Incorrect runtime

The Function App is configured for a different runtime than the deployed application.

Result: Functions may fail to start.

Solution: Verify the runtime and language stack.


Problem 3: Missing application setting

The function expects:

SERVICE_BUS_CONNECTION

but the setting isn’t configured.

Result: The function cannot connect to Service Bus.

Solution: Configure the required application setting or use a managed identity-based connection.


Problem 4: Deployment method incompatible with hosting plan

For example, attempting to use traditional Zip Deploy on Flex Consumption.

Result: The deployment approach isn’t supported.

Solution: Use the deployment technology appropriate for the hosting plan—One Deploy for Flex Consumption.


Problem 5: Expecting deployment slots on Flex Consumption

Flex Consumption currently does not support traditional deployment slots.

Solution: Use supported Flex Consumption site update strategies for zero-downtime deployment.


29. Key AI-200 Exam Distinctions

Memorize these concepts rather than isolated commands.

Function App vs. Function

Function

A unit of code triggered by an event.

Function App

The hosting and configuration environment for functions.


host.json vs. Application Settings

host.json

Controls Functions host behavior.

Application settings

Provide configuration and environment-specific values to the application.


Consumption vs. Flex Consumption

Consumption

Traditional serverless hosting option.

Flex Consumption

Modern serverless hosting option with additional configuration and networking capabilities.


Zip Deploy vs. One Deploy

Zip Deploy

Used with Consumption, Premium, and Dedicated plans.

One Deploy

The deployment technology for Flex Consumption.


Deployment Slots vs. Flex Rolling Updates

Deployment slots

Useful for supported hosting plans when you want to stage and swap deployments.

Flex Consumption

Doesn’t currently support deployment slots; use supported site update strategies such as rolling updates for zero-downtime deployments.


30. AI-200 Study Checklist

Before considering this topic mastered, make sure you can answer the following:

  • What is a Function App?
  • How does a Function differ from a Function App?
  • What are the major Azure Functions hosting plans?
  • What is the difference between Consumption and Flex Consumption?
  • Why would you choose Premium?
  • When would Dedicated hosting make sense?
  • What is host.json used for?
  • What are application settings?
  • Why shouldn’t secrets be hard-coded?
  • What is Zip Deploy?
  • What is One Deploy?
  • Which hosting plan requires One Deploy?
  • What does WEBSITE_RUN_FROM_PACKAGE do?
  • What are deployment slots?
  • Which plans support deployment slots?
  • What is the alternative to deployment slots in Flex Consumption?
  • How should production deployments be automated?
  • Why is CI/CD preferable for production?
  • How does Application Insights help troubleshoot Function Apps?
  • What are common deployment failures?

Practice Exam Questions

Question 1

A development team is creating a new Azure Function App using the Flex Consumption hosting plan. The team needs to deploy the application using the deployment technology supported by this hosting plan.

Which deployment technology should the team use?

A. Zip Deploy
B. FTP deployment
C. One Deploy
D. Local Git

Answer: C

Explanation:
Flex Consumption uses One Deploy as its deployment technology. Traditional Zip Deploy, FTP, and Local Git aren’t the deployment mechanism for Flex Consumption. One Deploy packages the application and stores the deployment package in the configured deployment storage.


Question 2

A Function App is configured with the following application setting:

SERVICEBUS_CONNECTION

The application uses this setting to obtain the connection information required to communicate with Azure Service Bus.

What is the primary purpose of an application setting in this scenario?

A. To define the Functions host version
B. To provide configuration values to the application at runtime
C. To define the HTTP trigger schema
D. To control the number of function instances

Answer: B

Explanation:
Application settings provide configuration values to the Function App and its code. They are commonly used for environment-specific configuration such as endpoints, connection information, and other runtime values. host.json, rather than an application setting, is used for many Functions host-level behaviors.


Question 3

A company deploys an Azure Function App to a supported hosting plan. Developers want to test a new version of the application before making it the production version. They want to deploy the new version separately and then swap it into production.

Which feature should they use?

A. Azure Event Grid
B. Function keys
C. Deployment slots
D. Application settings

Answer: C

Explanation:
Deployment slots allow supported Function Apps to run separate application instances such as staging and production. Developers can deploy and test the application in a staging slot and then swap the slot into production. Flex Consumption currently does not support traditional deployment slots.


Question 4

A developer creates a ZIP package for an Azure Function App. The ZIP file has this structure:

functionapp.zip
|
+-- MyFunctionProject
|
+-- host.json
+-- Function1
+-- Function2

The deployment succeeds, but Azure Functions cannot correctly locate the application files.

What is the most likely problem?

A. The ZIP package is too small
B. The Function App requires a deployment slot
C. host.json must be configured as an application setting
D. host.json isn’t located at the root of the deployment package

Answer: D

Explanation:
For ZIP deployment, host.json must be at the root of the extracted package. The common mistake is including the parent project directory inside the ZIP. The package should contain the application files directly at its root.


Question 5

A production Function App runs on a Consumption, Premium, or Dedicated plan. The development team wants to deploy the application as a ZIP package.

Which deployment technology should they generally use?

A. Zip Deploy
B. One Deploy
C. FTP only
D. Docker Compose

Answer: A

Explanation:
Zip Deploy is the default and recommended deployment technology for Function Apps running on Consumption, Elastic Premium, and Dedicated plans. Flex Consumption is the important exception because it uses One Deploy.


Question 6

An organization wants to run an Azure Functions application using a serverless hosting model. The application requires private networking capabilities and the organization wants to use a modern serverless Functions hosting option.

Which hosting plan is the best fit?

A. Dedicated App Service only
B. Flex Consumption
C. Classic Windows-only Consumption
D. Local development hosting

Answer: B

Explanation:
Flex Consumption is a Linux-based serverless hosting plan that provides additional capabilities such as private networking, configurable instance memory, and scaling options. It is currently Microsoft’s recommended serverless hosting plan for Azure Functions.


Question 7

A developer wants an Azure Function App to execute directly from a deployment package rather than copying the package contents into the normal application directory.

Which application setting is associated with running functions from a package for supported hosting plans?

A. FUNCTIONS_EXTENSION_VERSION
B. FUNCTIONS_WORKER_RUNTIME
C. WEBSITE_RUN_FROM_PACKAGE
D. SCM_DO_BUILD_DURING_DEPLOYMENT

Answer: C

Explanation:
WEBSITE_RUN_FROM_PACKAGE is used to configure supported Function Apps to run from a deployment package. When configured appropriately, the package is mounted as a read-only filesystem. Flex Consumption runs from a package by default and uses its own deployment model.


Question 8

A company has a Function App running on Flex Consumption. The development team wants to use the traditional deployment-slot model to deploy a staging version and then swap it into production.

What should the team do?

A. Create a second deployment slot
B. Enable FTP deployment
C. Convert the app to a Consumption plan automatically
D. Use a supported Flex Consumption site update strategy instead

Answer: D

Explanation:
Traditional deployment slots are not currently supported on Flex Consumption. Flex Consumption instead provides site update strategies, including rolling updates, for scenarios requiring zero-downtime deployments.


Question 9

A production Function App needs to access a database. The developer proposes putting the database password directly into the function’s source code.

Which approach is most appropriate?

A. Store the password in source control
B. Store the secret in Azure Key Vault and provide secure access through configuration or managed identity
C. Put the password in host.json
D. Store the password in the function name

Answer: B

Explanation:
Secrets should not be hard-coded into application source code or committed to source control. Azure Key Vault combined with managed identity is a strong approach for securely retrieving secrets. Application configuration can then provide non-secret configuration and references as appropriate.


Question 10

A development team is creating a production deployment pipeline for an Azure Function App. The team wants deployments to be repeatable and automatically tested before production deployment.

Which approach is most appropriate?

A. Manually upload files through the Azure portal for every release
B. Edit the production Function App directly in the portal
C. Use a CI/CD pipeline that builds, tests, packages, and deploys the Function App
D. Store production code only on the developer’s workstation

Answer: C

Explanation:
A CI/CD pipeline provides repeatable and automated deployment. A typical pipeline can build the application, run tests, package the application, deploy it to an appropriate environment, validate it, and promote it to production. This is much more reliable and auditable than manual production deployments.


Final Exam Takeaways

For AI-200 – Configure and deploy function apps, concentrate especially on the distinctions between hosting plans, configuration, and deployment technologies.

The highest-value concepts to remember are:

  1. A Function App provides the hosting environment for one or more functions.
  2. The hosting plan affects cost, scaling, networking, and deployment capabilities.
  3. Flex Consumption is the modern serverless Functions hosting option and is currently the recommended serverless plan.
  4. Flex Consumption uses One Deploy rather than traditional Zip Deploy.
  5. Zip Deploy is the recommended deployment technology for Consumption, Elastic Premium, and Dedicated plans.
  6. host.json controls Functions host behavior.
  7. Application settings provide runtime/environment configuration.
  8. Secrets should not be hard-coded into function code.
  9. Deployment slots allow supported hosting plans to stage and swap releases.
  10. Flex Consumption doesn’t currently support deployment slots.
  11. Flex Consumption can use rolling updates for zero-downtime deployments.
  12. WEBSITE_RUN_FROM_PACKAGE allows supported Function Apps to execute from a deployment package.
  13. ZIP packages must have host.json at the package root.
  14. CI/CD is the preferred approach for repeatable production deployments.
  15. Application Insights/Azure Monitor should be part of a production observability strategy.

These distinctions are particularly important because AI-200 scenario questions are likely to test which Azure Functions configuration or deployment approach best satisfies a set of requirements, rather than simply asking you to recall definitions.


Go to the AI-200 Exam Prep Hub main page

Configure and implement DAB deployment (DP-800 Exam Prep)

This post is a part of the DP-800: Developing AI-Enabled Database Solutions Exam Prep Hub.
This topic falls under these sections:
Secure, optimize, and deploy database solutions (35–40%)
   --> Integrate SQL solutions with Azure services
      --> Configure and implement DAB deployment


Note that there are 10 practice questions (with answers) at the end of each section to help you solidify your knowledge of the material. Also, there are 4 practice tests with 30 questions each available from the hub's main page below the exam topics section.

Introduction

Modern applications frequently require secure, scalable APIs to expose database objects without developers having to build and maintain extensive backend code. Data API Builder (DAB) is a Microsoft open-source runtime that automatically exposes Azure SQL Database, SQL Server, Azure Cosmos DB, PostgreSQL, and MySQL databases through REST and GraphQL endpoints.

While creating DAB configuration files is important, equally critical is deploying DAB securely and reliably into development, testing, staging, and production environments. The DP-800 exam expects SQL AI Developers to understand how DAB fits into CI/CD pipelines, containerized environments, Azure App Service, Azure Container Apps, Kubernetes, authentication systems, and infrastructure automation.

Understanding deployment strategies helps ensure that APIs remain secure, available, scalable, and maintainable.


What Is Data API Builder Deployment?

Deployment refers to the process of publishing the DAB runtime together with its configuration so that applications can consume database APIs.

A deployment includes:

  • Installing the DAB runtime
  • Providing the configuration file
  • Supplying environment variables
  • Configuring authentication
  • Connecting to databases
  • Deploying to the chosen hosting platform
  • Configuring monitoring
  • Configuring scaling
  • Managing updates

Unlike traditional applications, DAB is largely configuration-driven. Most deployments involve changing configuration rather than application code.


Common Deployment Targets

Microsoft supports several deployment options.

Local Development

Developers often begin locally using:

  • Windows
  • Linux
  • macOS

Example:

dab start

Advantages include:

  • Fast testing
  • Easy debugging
  • Local SQL Server integration
  • Rapid API validation

Local deployments should never expose production credentials.


Azure App Service

Azure App Service is one of the simplest production deployment options.

Benefits include:

  • Fully managed hosting
  • HTTPS enabled
  • Automatic scaling
  • Managed Identity
  • Deployment slots
  • Azure Monitor integration

Typical architecture:

Client
|
Azure App Service
|
Data API Builder
|
Azure SQL Database

Azure Container Apps

Many organizations package DAB inside a Docker container.

Advantages include:

  • Container portability
  • Autoscaling
  • Microservices architecture
  • Revision management
  • Simple CI/CD integration

Container Apps are becoming increasingly common for cloud-native solutions.


Azure Kubernetes Service (AKS)

Larger organizations often deploy DAB using Kubernetes.

Benefits include:

  • High availability
  • Rolling updates
  • Horizontal scaling
  • Container orchestration
  • Service mesh integration

Although AKS offers the most flexibility, it is also the most complex deployment option.


Docker

DAB is commonly deployed as a Docker container.

Example Dockerfile:

FROM mcr.microsoft.com/data-api-builder
COPY dab-config.json /App/

Benefits include:

  • Consistent environments
  • Easy version control
  • Portable deployments
  • Works across cloud providers

DAB Configuration During Deployment

Every deployment needs access to:

  • dab-config.json
  • Database connection information
  • Authentication settings
  • Runtime configuration

The configuration file should be packaged together with the deployment or mounted as a configuration volume.


Environment Variables

Production deployments should avoid hardcoded settings.

Instead, use environment variables.

Examples:

SQL_CONNECTION_STRING
AZURE_CLIENT_ID
AZURE_TENANT_ID
JWT_AUDIENCE

Benefits include:

  • Improved security
  • Easier environment changes
  • Better DevOps automation

Secure Connection Strings

Never store credentials directly inside configuration files.

Instead use:

  • Azure Key Vault
  • GitHub Secrets
  • Azure DevOps Library
  • Kubernetes Secrets
  • Environment variables

Example:

Instead of:

Password=MyPassword123

Use:

Password=${SQL_PASSWORD}

Managed Identity

One of Microsoft’s recommended deployment practices is using Managed Identity.

Instead of storing SQL credentials:

Application
|
Managed Identity
|
Azure SQL

Benefits include:

  • No stored passwords
  • Automatic credential rotation
  • Azure AD authentication
  • Reduced attack surface

DP-800 heavily emphasizes Managed Identity.


Authentication Configuration

Production deployments usually configure authentication providers such as:

  • Microsoft Entra ID
  • JWT providers
  • OAuth 2.0
  • Static development authentication (development only)

Authentication should be enabled before exposing APIs publicly.


HTTPS

Production DAB deployments should always use HTTPS.

Benefits include:

  • Encrypts traffic
  • Protects authentication tokens
  • Prevents packet interception
  • Supports secure REST and GraphQL endpoints

Azure App Service enables HTTPS automatically.


Reverse Proxies

Many production deployments place DAB behind:

  • Azure API Management
  • Azure Front Door
  • Azure Application Gateway
  • NGINX
  • Traefik

Advantages:

  • Centralized security
  • Rate limiting
  • Caching
  • Authentication
  • Request logging

CI/CD Deployment

DAB deployments fit naturally into DevOps pipelines.

Typical pipeline:

Developer
|
Git Repository
|
Build Pipeline
|
Unit Tests
|
Create Docker Image
|
Deploy
|
Smoke Tests
|
Production

Azure DevOps Deployment

Typical stages include:

  • Restore dependencies
  • Build
  • Validate DAB configuration
  • Build container
  • Push image
  • Deploy
  • Run validation tests

GitHub Actions

GitHub Actions commonly automate DAB deployment.

Example workflow:

Push
↓
Build
↓
Run Tests
↓
Create Container
↓
Publish Image
↓
Deploy Azure

Infrastructure as Code

Many organizations deploy DAB using:

  • Bicep
  • ARM templates
  • Terraform

Benefits include:

  • Repeatability
  • Version control
  • Consistent infrastructure
  • Automated provisioning

Configuration Validation

Before deployment, validate:

  • JSON syntax
  • Entity definitions
  • Authentication settings
  • Database connectivity
  • GraphQL relationships
  • Stored procedure mappings

Validation reduces deployment failures.


Monitoring

Production deployments should include monitoring.

Useful Azure services include:

  • Azure Monitor
  • Application Insights
  • Log Analytics
  • Azure Diagnostics

Monitor:

  • Request latency
  • Errors
  • Authentication failures
  • API throughput
  • CPU
  • Memory

Logging

Logs assist troubleshooting.

Typical events:

  • Startup failures
  • Invalid requests
  • Authentication failures
  • Database connection errors
  • SQL execution errors

Logs should never expose sensitive information.


Scaling DAB

Scaling depends on the hosting platform.

Azure App Service

  • Scale up
  • Scale out

Azure Container Apps

  • Autoscaling
  • Revision-based deployments

AKS

  • Horizontal Pod Autoscaler
  • Multiple replicas

High Availability

Production deployments commonly use:

  • Multiple DAB instances
  • Load balancers
  • Regional redundancy
  • Health probes

These reduce downtime.


Deployment Slots

Azure App Service supports deployment slots.

Example:

Production
↓
Staging Slot
↓
Validation
↓
Swap

Benefits:

  • Zero-downtime deployment
  • Easy rollback
  • Safe production updates

Versioning

Multiple API versions may run simultaneously.

Example:

v1
v2
v3

Benefits include:

  • Backward compatibility
  • Easier client migration
  • Controlled feature rollout

Rollback Strategy

Every deployment should support rollback.

Common methods:

  • Previous Docker image
  • Previous deployment slot
  • Previous Git tag
  • Previous release pipeline

Rollback minimizes production risk.


Security Best Practices

Recommended practices include:

  • HTTPS only
  • Managed Identity
  • Least privilege
  • Azure Key Vault
  • Authentication enabled
  • Authorization configured
  • Secure secrets
  • Monitor logs
  • Enable auditing
  • Disable unused endpoints

DP-800 Exam Tips

Remember these key points:

  • DAB deployments commonly use Azure App Service, Azure Container Apps, Docker, or AKS.
  • Avoid hardcoded secrets.
  • Prefer Managed Identity over SQL usernames/passwords.
  • Store secrets in Azure Key Vault.
  • Automate deployments using GitHub Actions or Azure DevOps.
  • Validate configurations before deployment.
  • Use deployment slots to minimize downtime.
  • Monitor deployments with Azure Monitor and Application Insights.
  • Use HTTPS for every production deployment.
  • Implement rollback strategies.

Practice Exam Questions

Question 1

Your organization wants to deploy Data API Builder with automatic operating system patching, built-in HTTPS, deployment slots, and minimal administrative overhead.

Which deployment target best meets these requirements?

A. Azure Kubernetes Service

B. Azure App Service

C. Self-managed virtual machine

D. Docker Desktop

Answer: B

Explanation: Azure App Service is a fully managed platform that provides HTTPS, automatic OS maintenance, deployment slots, autoscaling, and simplified application hosting.


Question 2

A company wants to eliminate database passwords from its DAB deployment while securely authenticating to Azure SQL Database.

What is the recommended authentication method?

A. Store SQL credentials in Git

B. Use SQL Authentication with encrypted passwords

C. Use Azure Managed Identity

D. Create a shared administrator account

Answer: C

Explanation: Managed Identity removes the need to store credentials, uses Microsoft Entra ID authentication, and automatically manages credential rotation.


Question 3

Which deployment practice provides the greatest protection for database connection strings?

A. Embed the connection string in the DAB configuration file

B. Store the connection string in application source code

C. Save credentials in a shared documentation file

D. Store secrets in Azure Key Vault and reference them during deployment

Answer: D

Explanation: Azure Key Vault securely stores secrets outside application code and integrates with Managed Identity and deployment pipelines.


Question 4

During deployment, a development team wants every code commit to automatically build, validate, test, and deploy DAB.

Which approach should they use?

A. Manual deployment using PowerShell

B. SQL Server Management Studio

C. A CI/CD pipeline using GitHub Actions or Azure DevOps

D. Windows Task Scheduler

Answer: C

Explanation: CI/CD pipelines automate builds, testing, validation, packaging, and deployment, reducing manual effort and deployment errors.


Question 5

Why should production DAB deployments use HTTPS?

A. It increases SQL query speed.

B. It compresses GraphQL responses.

C. It encrypts network communication between clients and the API.

D. It eliminates authentication requirements.

Answer: C

Explanation: HTTPS protects sensitive information such as authentication tokens and API traffic from interception during transmission.


Question 6

Which Azure service is specifically designed to collect application telemetry, performance metrics, and diagnostics for deployed DAB applications?

A. Azure Application Insights

B. Azure Storage Explorer

C. Azure Bastion

D. Azure Data Factory

Answer: A

Explanation: Application Insights provides monitoring, distributed tracing, diagnostics, performance metrics, and failure analysis for deployed applications.


Question 7

A team wants to release a new DAB version without interrupting production users and retain the ability to roll back immediately if problems occur.

Which Azure App Service feature should they use?

A. Reserved instances

B. Deployment slots

C. Availability zones

D. Geo-replication

Answer: B

Explanation: Deployment slots allow applications to be validated before swapping into production and enable quick rollback if issues are discovered.


Question 8

Why are environment variables commonly used during DAB deployment?

A. They automatically optimize SQL queries.

B. They eliminate authentication requirements.

C. They reduce GraphQL response sizes.

D. They separate configuration from application code and simplify deployment across environments.

Answer: D

Explanation: Environment variables allow different settings for development, testing, and production without modifying the application or configuration files.


Question 9

Which deployment platform provides the highest level of container orchestration and scalability for large enterprise DAB deployments?

A. Azure Kubernetes Service

B. Azure App Service

C. Windows Server

D. Docker Desktop

Answer: A

Explanation: AKS offers advanced orchestration, automatic scaling, rolling updates, service discovery, and high availability for enterprise containerized workloads.


Question 10

Before promoting a DAB deployment to production, what validation activity is most important?

A. Disable authentication temporarily.

B. Increase CPU resources.

C. Validate configuration files, authentication settings, and database connectivity.

D. Remove monitoring to improve performance.

Answer: C

Explanation: Validating configuration, connectivity, and authentication helps prevent deployment failures and ensures the API functions correctly before reaching production users.


Go to the DP-800 Exam Prep Hub main page