Tag: azure

Plan and implement Azure Bastion (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)
      --> Plan and implement Azure Bastion


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 Bastion is a fully managed Azure platform service that provides secure Remote Desktop Protocol (RDP) and Secure Shell (SSH) connectivity to Azure virtual machines.

Instead of exposing RDP or SSH directly to the public internet, administrators connect to Azure Bastion through the Azure portal or, when supported, through a native RDP or SSH client. Bastion then connects to the target virtual machine over its private IP address.

Azure Bastion is particularly useful for reducing the attack surface of administrative access to virtual machines. It helps eliminate the need to assign public IP addresses to VMs solely for remote management.

For the SC-500 exam, you should understand:

  • Why Azure Bastion is used.
  • How Bastion is deployed in a virtual network.
  • The purpose of the AzureBastionSubnet.
  • Bastion SKU differences.
  • Browser-based and native-client connections.
  • Private-only Bastion deployments.
  • Bastion integration with network security controls.
  • How to select the appropriate SKU.
  • Common deployment and connectivity problems.

Why Azure Bastion Is Important

Traditional remote administration often requires exposing:

  • RDP on TCP port 3389.
  • SSH on TCP port 22.

Exposing these ports directly to the internet increases the attack surface and can make virtual machines targets for:

  • Password attacks.
  • Credential stuffing.
  • Brute-force attacks.
  • Exploitation of protocol vulnerabilities.
  • Port scanning.
  • Automated reconnaissance.

Azure Bastion provides an alternative administrative access pattern:

  1. The administrator signs in to Azure.
  2. The administrator selects a virtual machine.
  3. The administrator chooses Connect > Bastion.
  4. Azure Bastion establishes the RDP or SSH connection.
  5. The session is presented through the browser or a supported native client.
  6. The VM is accessed through its private IP address.

The target VM does not need:

  • A public IP address.
  • An RDP or SSH agent.
  • Special client software for browser-based access.
  • Direct internet exposure of management ports.

Bastion is therefore a network-security control for administrative access, not a replacement for identity security or VM hardening.


Azure Bastion Architecture

Dedicated Bastion Deployment

For the Basic, Standard, and Premium SKUs, Azure Bastion is deployed into a dedicated subnet named:

AzureBastionSubnet

The subnet must be reserved for Azure Bastion. Other Azure resources should not be deployed into it.

For dedicated Bastion deployments, Microsoft recommends a subnet of at least /26 to support scaling and future feature requirements. The subnet can be larger, such as /25 or /24.

A typical architecture is:

Administrator
|
| HTTPS/TLS
v
Azure Bastion
|
| Private RDP or SSH
v
Azure Virtual Machine

The VM can remain without a public IP address.

Bastion in a Hub-and-Spoke Network

Azure Bastion can support connections to VMs in:

  • The same virtual network.
  • Peered virtual networks, when supported by the selected SKU and architecture.

A common enterprise design is to deploy Bastion in a central hub virtual network and use virtual network peering to access VMs in spoke virtual networks.

This allows an organization to centralize administrative access instead of deploying a separate Bastion resource in every spoke.

The selected SKU must support virtual network peering. The Developer SKU does not support peered virtual network connections.


Azure Bastion SKUs

Azure Bastion provides four SKUs:

  • Developer.
  • Basic.
  • Standard.
  • Premium.

The SKU affects:

  • Cost.
  • Deployment architecture.
  • Number of supported connections.
  • Scaling.
  • Native-client support.
  • File transfer.
  • Custom ports.
  • Shareable links.
  • Session recording.
  • Private-only deployment.

Developer SKU

The Developer SKU is intended for development and testing.

Characteristics include:

  • No additional Bastion hourly charge.
  • Shared infrastructure.
  • One VM connection at a time.
  • Browser-based access.
  • Support for RDP to Windows VMs.
  • Support for SSH to Linux VMs.
  • No virtual network peering.
  • Limited feature set.
  • Availability only in selected regions.

The Developer SKU is not intended for production workloads because it uses shared infrastructure and supports only one VM connection at a time.

Use Developer when:

  • The environment is for development or testing.
  • Cost is a major consideration.
  • Only occasional browser-based access is required.
  • Advanced features are unnecessary.
  • The region supports the Developer SKU.

Basic SKU

The Basic SKU provides a dedicated Bastion deployment with fixed capacity.

It supports:

  • Browser-based RDP.
  • Browser-based SSH.
  • Connections to VMs in the same or peered virtual networks.
  • Dedicated Bastion infrastructure.

The Basic SKU does not provide several advanced capabilities, including:

  • Native-client connections.
  • Shareable links.
  • IP-based connections.
  • Custom inbound ports.
  • File transfer through the native client.
  • Configurable host scaling.

Basic is appropriate when an organization needs a dedicated production deployment but does not require advanced connection features.

Standard SKU

The Standard SKU includes the Basic features and adds advanced capabilities such as:

  • Native RDP and SSH client connections.
  • Configurable host scaling.
  • Shareable links.
  • IP-based connections.
  • Custom inbound ports.
  • File upload and download.
  • Higher connection capacity.
  • Ability to configure additional Bastion features.

The Standard SKU is appropriate when administrators need to connect using local RDP or SSH clients or when the organization needs greater scalability.

Premium SKU

The Premium SKU includes Standard features and adds:

  • Session recording.
  • Private-only deployment.
  • No public IP address on the Bastion resource in a private-only architecture.

Premium is appropriate when an organization requires:

  • High-security administrative access.
  • Session audit trails.
  • Compliance-oriented session recording.
  • A fully private Bastion deployment.
  • Stronger restrictions on internet exposure.

The Premium SKU is the most appropriate choice when the requirement explicitly states that Bastion itself must not have a public IP address.


SKU Comparison

CapabilityDeveloperBasicStandardPremium
Intended useDevelopment and testingDedicated production accessAdvanced production accessHigh-security production access
Dedicated infrastructureNoYesYesYes
Browser-based RDP and SSHYesYesYesYes
Same-VNet connectivityYesYesYesYes
Peered-VNet connectivityNoYesYesYes
Concurrent connectionsOne VM at a timeFixed capacityConfigurable scalingConfigurable scaling
Native RDP/SSH clientNoNoYesYes
Custom portsNoNoYesYes
IP-based connectionsNoNoYesYes
Shareable linksNoNoYesYes
File transferNoNoYesYes
Session recordingNoNoNoYes
Private-only deploymentNoNoNoYes
Hourly Bastion chargeNoYesYesYes

The exact capacity depends on the SKU, number of Bastion instances, connection type, and current service limits. Standard and Premium support host scaling, while Basic provides fixed capacity.


Selecting the Correct SKU

Use the following decision process.

Choose Developer when:

  • The workload is development or testing.
  • One VM connection at a time is sufficient.
  • No peered-network access is required.
  • No advanced features are required.
  • The region supports Developer.

Choose Basic when:

  • A dedicated deployment is required.
  • Browser-based RDP and SSH are sufficient.
  • Fixed capacity is acceptable.
  • Native-client access is not required.
  • Session recording is not required.
  • Private-only deployment is not required.

Choose Standard when:

  • Native RDP or SSH clients are required.
  • File transfer is required.
  • Custom ports are required.
  • Shareable links are required.
  • IP-based connections are required.
  • Host scaling is required.
  • Higher connection concurrency is needed.

Choose Premium when:

  • Session recording is required.
  • Bastion must use a private-only deployment.
  • The Bastion resource must not have a public IP address.
  • Compliance requires administrative session audit trails.
  • The workload has stringent security requirements.

A common exam clue is:

“The VM must not have a public IP address.”

This requirement alone does not necessarily require Premium. Basic, Standard, and Premium can provide access to VMs without public IP addresses.

A different requirement is:

“Bastion itself must not have a public IP address.”

That points to a Premium private-only deployment.


Deploying Azure Bastion

Deployment Prerequisites

Before deploying Bastion, verify:

  • The target virtual network exists.
  • The virtual network is in a supported region.
  • The target VM is deployed in the same or a peered virtual network.
  • The required subnet exists.
  • The subnet is named AzureBastionSubnet.
  • The subnet is at least /26 for dedicated deployments.
  • The selected SKU supports the required features.
  • The required public IP configuration is available.
  • Network security rules do not block required Bastion traffic.
  • The administrator has sufficient Azure permissions.

For Basic, Standard, and Premium deployments, the subnet is dedicated to Bastion.

Do not deploy virtual machines, Azure Firewall, NAT Gateway, or other unrelated resources into AzureBastionSubnet.


Deploying from the Azure Portal

A typical portal deployment process is:

  1. Sign in to the Azure portal.
  2. Open the target virtual network or virtual machine.
  3. Select Connect > Bastion, or create a Bastion resource.
  4. Select the appropriate subscription.
  5. Select or create a resource group.
  6. Select the target virtual network.
  7. Select the Bastion SKU.
  8. Configure the AzureBastionSubnet.
  9. Configure the public IP address if required.
  10. Configure optional advanced features.
  11. Select Review + create.
  12. Validate the configuration.
  13. Select Create.

Dedicated Bastion deployments generally take longer to provision than the Developer SKU.


Public IP Requirements

For standard dedicated deployments:

  • Basic requires a public IP address.
  • Standard requires a public IP address.
  • Premium can use a public IP address or a private-only deployment.

The public IP address is associated with Bastion, not with the target VM.

The target VM can remain accessible only through its private IP address.

For a private-only Premium deployment:

  • Bastion has no public IP address.
  • Administrative connectivity must use private network connectivity.
  • The administrator must have an appropriate path into the virtual network, such as a corporate network connection, private connectivity, or another approved access mechanism.

Private-only Bastion is therefore useful for environments that require no internet-routable Bastion endpoint.


Connecting to Virtual Machines

Browser-Based Connections

Browser-based connections use the Azure portal and an HTML5 web client.

The administrator:

  1. Opens the virtual machine in the Azure portal.
  2. Selects Connect.
  3. Selects Bastion.
  4. Selects the connection protocol.
  5. Provides the required credentials.
  6. Selects Connect.

For Windows VMs, the default RDP port is usually:

3389

For Linux VMs, the default SSH port is usually:

22

Browser-based connections do not require a public IP address on the VM or special client software on the administrator’s computer.

RDP Connections

RDP is normally used to connect to Windows virtual machines.

The user must have the appropriate rights on the target VM. Depending on the authentication method, the user may need to be:

  • A local administrator.
  • A member of the Remote Desktop Users group.
  • Assigned an appropriate Microsoft Entra VM login role.

SSH Connections

SSH is normally used to connect to Linux virtual machines.

The administrator may authenticate using:

  • A username and password, where supported.
  • An SSH private key.
  • Microsoft Entra ID authentication, where supported and configured.

The VM must be configured to accept the selected authentication method.


Native-Client Connections

The native-client feature allows administrators to use the RDP or SSH client installed on their local computer instead of using only the browser-based client.

Native-client support requires:

  • Standard or Premium SKU.
  • Native-client support enabled.
  • Appropriate VM and authentication configuration.
  • Azure CLI for supported connection workflows.

Native-client connections can support additional capabilities, such as:

  • Local RDP or SSH client use.
  • Microsoft Entra authentication.
  • File transfer for supported connection types.
  • Custom ports.
  • Multiple concurrent VM sessions.

Session recording is not available for native-client connections. Session recording is a Premium feature for supported browser-based sessions.

Native-Client Limitations

Important limitations include:

  • Native-client support is not available with Developer or Basic.
  • Native-client connections are not supported from Azure Cloud Shell.
  • SSH private keys stored in Azure Key Vault cannot be used directly for native-client sign-in.
  • The private key must be available as a file on the local computer when using that authentication method.
  • Capabilities vary depending on the local client, target VM, protocol, and Bastion configuration.

Network Security Considerations

Azure Bastion reduces the need to expose RDP and SSH ports publicly, but network security rules still matter.

Network Security Groups

Network Security Groups can be used to control traffic to and from subnets and network interfaces.

When using Bastion, ensure that NSG rules do not unintentionally block:

  • Required Bastion control-plane traffic.
  • Bastion-to-VM RDP traffic.
  • Bastion-to-VM SSH traffic.
  • Required Azure platform communication.

For native-client configurations, administrators may use NSG rules to restrict access to required ports such as:

  • TCP 22 for SSH.
  • TCP 3389 for RDP.

Custom ports require Standard or Premium.

User-Defined Routes

User-defined routes are not supported on the Azure Bastion subnet.

This is important when designing a network that also contains:

  • Azure Firewall.
  • Network virtual appliances.
  • Custom routing.
  • Hub-and-spoke network topologies.

Bastion-to-VM communication is private, and traffic does not generally need to be forced through Azure Firewall by applying a user-defined route to AzureBastionSubnet.

Azure Firewall

Azure Firewall and Azure Bastion serve different purposes:

  • Azure Bastion provides administrative RDP and SSH connectivity.
  • Azure Firewall provides centralized traffic inspection and filtering.

They can be deployed in the same overall network architecture, but they should not be treated as interchangeable services.


Azure Bastion and Just-in-Time VM Access

Azure Bastion and Just-in-Time VM access solve related but different problems.

Azure Bastion

Azure Bastion:

  • Provides a secure access path to VMs.
  • Reduces the need for public IP addresses.
  • Avoids exposing RDP and SSH directly to the internet.
  • Provides browser-based or native-client connectivity.

Just-in-Time VM Access

Just-in-Time VM access:

  • Opens management ports only when access is requested.
  • Limits the duration of access.
  • Creates temporary network security rules.
  • Is useful for VMs that still require public management access.

Bastion is generally the better choice when the goal is to eliminate public management exposure altogether.

Just-in-Time access may be useful when a VM must retain a public IP address or when direct access is required for a specific operational scenario.

The two controls can be evaluated independently and may be used together where appropriate.


Azure Bastion and Point-to-Site VPN

Azure Bastion provides access to virtual machines through RDP and SSH.

A point-to-site VPN provides network-level access from an individual client into an Azure virtual network.

Use Azure Bastion when administrators need:

  • RDP or SSH access to VMs.
  • A browser-based administrative experience.
  • No public IP address on the VM.
  • A controlled access path to specific virtual machines.

Use point-to-site VPN when administrators need access to:

  • Databases.
  • Internal web applications.
  • Storage services.
  • Multiple private network resources.
  • Other services that are not accessed through RDP or SSH.

A VPN provides broader network access, while Bastion focuses primarily on secure VM administration.


Managing Bastion Sessions

Depending on the SKU and connection method, Bastion may support:

  • Copy and paste.
  • Full-screen sessions.
  • File upload.
  • File download.
  • Custom ports.
  • Shareable links.
  • Session recording.

Shareable Links

Shareable links allow users to connect to a specific VM without navigating through the Azure portal in the usual way.

They are available with Standard and Premium and should be governed carefully because they can simplify access distribution.

Use them only when:

  • The recipient is authorized.
  • The link is distributed securely.
  • The organization understands the access implications.
  • The link is revoked or allowed to expire when no longer needed.

Session Recording

Session recording is available with Premium for supported browser-based sessions.

It can help organizations:

  • Review administrative activity.
  • Support compliance requirements.
  • Investigate suspicious behavior.
  • Establish an audit trail for privileged access.

Session recording should not be assumed to apply to native-client sessions. Native-client sessions do not support session recording.


Monitoring and Troubleshooting

When Bastion connectivity fails, investigate the following areas.

Bastion Resource State

Check:

  • Provisioning state.
  • SKU.
  • Region.
  • Configuration settings.
  • Health status.
  • Availability.
  • Recent deployment changes.

Virtual Network

Verify:

  • The VM is in the expected virtual network.
  • Peering is configured correctly.
  • Peering is in a connected state.
  • Address spaces do not overlap.
  • Required routes are available.
  • The VM has a private IP address.

Subnet

For dedicated deployments, verify:

  • The subnet is named AzureBastionSubnet.
  • The subnet is at least /26.
  • No unrelated resources are deployed in the subnet.
  • NSG configuration is compatible with Bastion.
  • No unsupported user-defined routes are applied.

VM Configuration

Verify:

  • The VM is running.
  • The operating system supports the selected protocol.
  • RDP or SSH is enabled.
  • The required service is running.
  • The VM’s guest firewall permits the connection.
  • The user has the required permissions.
  • The selected port is correct.

Authentication

Check:

  • Username and password.
  • SSH key.
  • Microsoft Entra authentication configuration.
  • VM login role assignments.
  • Local group membership.
  • Credential expiration.
  • Conditional Access requirements.

SKU Features

A connection may fail or an option may be unavailable because the SKU does not support it.

Examples:

  • Native-client option missing: use Standard or Premium.
  • Custom port unavailable: use Standard or Premium.
  • Session recording unavailable: use Premium for supported browser sessions.
  • Private-only deployment unavailable: use Premium.
  • Peered-VNet access unavailable: do not use Developer.

Common Mistakes to Avoid

Mistake 1: Deploying resources into AzureBastionSubnet

The Bastion subnet is reserved for Azure Bastion.

Mistake 2: Using a subnet that is too small

Dedicated Bastion deployments should use at least a /26 subnet to support current and future requirements.

Mistake 3: Assuming Basic supports native-client connections

Native-client connections require Standard or Premium.

Mistake 4: Assuming Premium is required just because the VM has no public IP

All dedicated Bastion SKUs can provide access to VMs without public IP addresses. Premium is required when Bastion itself must be private-only.

Mistake 5: Assuming Bastion replaces RBAC

Azure Bastion provides network access, but users still need appropriate permissions on the Bastion resource, virtual network, VM, and operating system.

Mistake 6: Applying unsupported user-defined routes to the Bastion subnet

User-defined routes are not supported on AzureBastionSubnet.

Mistake 7: Assuming session recording works with native clients

Session recording is not available for native-client connections.

Mistake 8: Using Developer in production

Developer is designed for development and testing and supports only one VM connection at a time.

Mistake 9: Ignoring VM-level firewalls

Bastion does not bypass the VM’s operating system firewall or authentication requirements.

Mistake 10: Confusing Bastion with a VPN

Bastion provides RDP and SSH access. A VPN provides broader network-level connectivity.


Key Takeaways

For the SC-500 exam, remember:

  1. Azure Bastion provides secure RDP and SSH access to Azure VMs.
  2. Bastion reduces the need to expose VM management ports to the internet.
  3. Target VMs do not need public IP addresses.
  4. Dedicated Bastion deployments use AzureBastionSubnet.
  5. The dedicated subnet should be at least /26.
  6. The Bastion subnet is reserved for Bastion.
  7. Developer is intended for development and testing.
  8. Basic provides dedicated browser-based access with fixed capacity.
  9. Standard adds native clients, scaling, custom ports, file transfer, and other advanced features.
  10. Premium adds session recording and private-only deployment.
  11. Native-client support requires Standard or Premium.
  12. Private-only Bastion requires Premium.
  13. Session recording is not available for native-client sessions.
  14. User-defined routes are not supported on the Bastion subnet.
  15. Bastion and Just-in-Time VM access are different controls.
  16. Bastion provides VM administration, while VPN provides broader network access.
  17. VM-level permissions and firewalls still apply.
  18. SKU selection should be based on required features, capacity, and security requirements.

Practice Exam Questions

Question 1

An organization wants administrators to connect to Azure VMs through the Azure portal without assigning public IP addresses to the VMs.

Which service should the organization use?

A. Azure Bastion
B. Azure DNS Private Resolver
C. Azure Application Gateway
D. Azure Load Balancer

Correct answer: A

Explanation: Azure Bastion provides browser-based RDP and SSH access to VMs through their private IP addresses. The VMs do not need public IP addresses for this access pattern.


Question 2

You are deploying a dedicated Azure Bastion resource. Which subnet configuration is required?

A. A subnet named GatewaySubnet with a /29 prefix
B. A subnet named AzureFirewallSubnet with a /27 prefix
C. A subnet named AzureBastionSubnet with at least a /26 prefix
D. A subnet named AppGatewaySubnet with a /28 prefix

Correct answer: C

Explanation: Dedicated Bastion deployments use a subnet named AzureBastionSubnet. A /26 or larger subnet is recommended and required for the supported dedicated deployment configuration.


Question 3

A development team needs free, browser-based access to one Azure VM at a time. The team does not need virtual network peering or advanced features.

Which Bastion SKU should you select?

A. Basic
B. Developer
C. Standard
D. Premium

Correct answer: B

Explanation: The Developer SKU is intended for development and testing, is available at no additional Bastion hourly charge, and supports one VM connection at a time.


Question 4

A production environment requires administrators to connect to VMs using the native RDP client installed on their local Windows computers.

Which minimum Bastion SKU is required?

A. Developer
B. Basic
C. Standard
D. None; native-client support is available with every SKU

Correct answer: C

Explanation: Native-client support requires the Standard or Premium SKU. Developer and Basic support browser-based connections but not native-client connections.


Question 5

A company requires Bastion itself to have no public IP address. Which configuration should be used?

A. Basic Bastion with a private VM IP address
B. Standard Bastion with a private VM IP address
C. Developer Bastion in a peered virtual network
D. Premium Bastion with private-only deployment

Correct answer: D

Explanation: Premium supports private-only deployment, in which Bastion does not use a public IP address. Other dedicated SKUs can access VMs privately but normally require a public IP address for Bastion.


Question 6

Which Bastion feature is available with Premium but not with Standard?

A. Browser-based SSH
B. Browser-based RDP
C. Session recording
D. Access to VMs in the same virtual network

Correct answer: C

Explanation: Premium adds session recording and private-only deployment. Browser-based RDP and SSH and same-VNet connectivity are available with lower dedicated SKUs.


Question 7

An administrator wants to apply a user-defined route to AzureBastionSubnet so that all Bastion traffic passes through an Azure Firewall.

What should the administrator know?

A. User-defined routes are not supported on the Bastion subnet
B. User-defined routes are required for every Bastion deployment
C. User-defined routes are supported only with Developer
D. User-defined routes are required to connect to VMs in the same virtual network

Correct answer: A

Explanation: User-defined routes are not supported on AzureBastionSubnet. Bastion-to-VM communication is private and does not generally require forcing traffic from the Bastion subnet through Azure Firewall.


Question 8

An organization needs to connect to VMs in multiple spoke virtual networks from a Bastion resource deployed in a hub virtual network.

Which requirement is important?

A. The Bastion resource must use Developer
B. Virtual network peering must be configured, and the selected SKU must support peered-VNet connectivity
C. Every VM must have a public IP address
D. All VMs must be in the same subnet as Bastion

Correct answer: B

Explanation: Bastion can support VMs in peered virtual networks when peering is correctly configured and the selected SKU supports that capability. Developer does not support peered-VNet connections.


Question 9

A security team wants to use Azure Bastion to provide RDP and SSH access, but it also needs network-level access to private databases and internal web applications.

Which additional service may be appropriate?

A. Azure VPN Gateway with point-to-site connectivity
B. Azure Storage firewall
C. Azure Key Vault
D. Azure DDoS Protection

Correct answer: A

Explanation: Bastion focuses on RDP and SSH access to VMs. A point-to-site VPN provides broader network-level access to resources such as databases, storage, and internal applications.


Question 10

A company requires file transfer, custom inbound ports, host scaling, and native-client connections through Azure Bastion. Session recording is not required.

Which is the most appropriate minimum SKU?

A. Developer
B. Basic
C. Standard
D. Premium

Correct answer: C

Explanation: Standard supports native-client connections, file transfer, custom inbound ports, and configurable host scaling. Premium is unnecessary unless features such as session recording or private-only deployment are required.


Go to the SC-500 Exam Prep Hub main page

Implement resource locks (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:
Manage identity, access, and governance (20–25%)
   --> Implement governance to enforce security and regulatory compliance
      --> Implement resource locks


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

Azure resource locks are an important governance mechanism for protecting critical Azure resources from accidental or unauthorized deletion or modification.

For the SC-500 exam, you should understand:

  • What Azure resource locks are
  • The two types of locks
  • Where locks can be applied
  • How locks are inherited
  • How locks interact with Azure RBAC
  • The difference between control-plane and data-plane operations
  • When to use CanNotDelete versus ReadOnly
  • How to create and manage locks
  • Important limitations and operational considerations

Resource locks are especially useful for protecting critical infrastructure such as production resource groups, databases, storage accounts, networking components, and other resources that should not be accidentally removed or modified.


1. What Are Azure Resource Locks?

An Azure resource lock is a management control that prevents users from accidentally deleting or modifying Azure resources.

Locks can be applied at several scopes, including:

  • Subscription
  • Resource group
  • Individual resource

When a lock is applied to a parent scope, resources contained within that scope can inherit the lock.

Resource locks are implemented through Azure Resource Manager and are sometimes referred to as management locks.

The key purpose of a resource lock is:

Protect important Azure resources from accidental deletion or modification, even when the user otherwise has sufficient permissions to perform the operation.

This makes resource locks different from ordinary Azure RBAC permissions.


2. Resource Locks vs. Azure RBAC

This distinction is extremely important for the SC-500 exam.

Azure RBAC determines what actions a user, group, service principal, or managed identity is authorized to perform.

A resource lock imposes an additional restriction on operations against the locked resource.

For example, suppose a user has the Owner role on a resource group.

Normally, the user has sufficient permissions to delete resources in that resource group.

If the resource group has a CanNotDelete lock, however, the user cannot delete the locked resource until the lock is removed.

Therefore:

A resource lock can restrict an operation even when the user has sufficient RBAC permissions to perform that operation.

This is one of the most important concepts to remember.

Simple comparison

CapabilityAzure RBACResource Lock
Determines who has permissionsYesNo
Grants permissionsYesNo
Restricts deletionIndirectly, through permissionsYes
Restricts modificationThrough permissionsYes, with ReadOnly
Applies to all users/roles at the locked scopeNoYes
Protects against accidental deletionIndirectlySpecifically designed for this
Replaces RBACNoNo

Resource locks and RBAC are therefore complementary, not competing, security controls.


3. The Two Primary Resource Lock Types

Azure provides two primary management lock levels:

  1. CanNotDelete
  2. ReadOnly

The names used in the Azure portal are:

  • Delete
  • Read-only

The underlying Azure Resource Manager lock levels are:

  • CanNotDelete
  • ReadOnly

Understanding exactly what each does is essential for the exam.


4. CanNotDelete Lock

A CanNotDelete lock prevents the locked resource from being deleted.

Authorized users can still:

  • Read the resource
  • Modify the resource

They simply cannot delete it while the lock remains in place.

Example

Suppose a production SQL database has a CanNotDelete lock.

An administrator can still change supported configuration settings.

However, an attempt to delete the database will fail because the resource is locked.

Think of it as:

“You can change it, but you cannot delete it.”

This is generally the less restrictive of the two lock types.


5. ReadOnly Lock

A ReadOnly lock is more restrictive.

It prevents users from:

  • Modifying the resource
  • Deleting the resource

Users can still read the resource.

Think of it as:

“You can look at it, but you cannot change or delete it.”

A ReadOnly lock is conceptually similar to restricting authorized users to read-only access for control-plane operations.

However, there are important nuances involving data-plane operations, discussed later.


6. CanNotDelete vs. ReadOnly

This comparison should be memorized for the exam.

Lock TypeReadModifyDelete
No lockYesYes*Yes*
CanNotDeleteYesYesNo
ReadOnlyYesNoNo

* Subject to the user’s normal RBAC permissions and other governance controls.

Easy memory trick

CanNotDelete:

Change it, but don’t delete it.

ReadOnly:

Read it, but don’t change or delete it.


7. Where Can Resource Locks Be Applied?

Resource locks can be applied at several scopes.

Subscription

A lock can be applied to an entire Azure subscription.

This can protect resources throughout the subscription.

However, a subscription-level lock can have a very broad impact and should therefore be used carefully.


Resource Group

A lock can be applied to a resource group.

This is a common approach for protecting a collection of related production resources.

For example:

Production Resource Group
│
├── Web App
├── Application Gateway
├── SQL Database
├── Storage Account
└── Key Vault

A CanNotDelete lock on the resource group can protect the resources from deletion.


Individual Resource

A lock can also be applied directly to a specific resource.

For example:

Production Resource Group
│
├── Web App
├── SQL Database ← CanNotDelete
├── Storage Account
└── Key Vault

Only the targeted resource is protected by the lock, subject to lock inheritance and scope rules.

This can be preferable when only a particularly critical resource needs protection.


8. Lock Inheritance

Locks can be inherited from a parent scope.

For example:

Subscription
│
└── Resource Group
│
├── VM
├── Storage Account
└── SQL Database

If a lock is applied to the resource group, the resources contained within that resource group inherit the lock.

This also means that resources added to the resource group later can inherit the applicable lock.

Exam scenario

Suppose:

  • Resource group ProductionRG has a CanNotDelete lock.
  • A new storage account is created in ProductionRG.

The storage account inherits the applicable lock.

The protection isn’t limited only to resources that existed when the lock was originally created.


9. The Most Restrictive Lock Takes Precedence

Multiple locks can exist within an inheritance hierarchy.

When multiple locks apply, the most restrictive lock takes precedence.

For example:

Resource Group
CanNotDelete
↓
Storage Account
ReadOnly

The storage account is effectively protected by the more restrictive ReadOnly behavior.

Therefore, when evaluating a scenario, don’t look only at a resource’s direct lock.

Consider:

  1. The resource’s own lock
  2. The parent resource group’s lock
  3. The subscription-level lock
  4. Which applicable lock is most restrictive

10. Resource Locks Are Control-Plane Controls

One of the most important technical details for the SC-500 exam is that resource locks apply to Azure Resource Manager control-plane operations.

They do not universally protect data-plane operations.

Control plane

The control plane manages Azure resources themselves.

Examples include operations such as:

  • Creating resources
  • Deleting resources
  • Updating resource configuration
  • Changing resource properties

These operations generally go through Azure Resource Manager.

Data plane

The data plane operates on the data contained within a resource.

Examples include:

  • Reading blob data
  • Writing blob data
  • Reading database records
  • Modifying database records

A resource lock does not automatically prevent all data-plane operations.


11. Example: Storage Account Lock

Consider a storage account containing:

Storage Account
│
├── Blob Container
│ ├── File A
│ └── File B
│
├── Queue
└── Table

You apply a CanNotDelete lock to the storage account.

The lock protects the storage account resource against deletion.

However, it does not automatically prevent someone with appropriate data-plane permissions from deleting Blob File A.

Why?

Because:

The lock protects Azure Resource Manager control-plane operations; it isn’t a general-purpose data protection mechanism.

This is a very common exam trap.


12. Resource Locks Do Not Replace Data Protection

Suppose an organization wants to protect important data stored in Azure Storage.

A resource lock can help prevent someone from deleting the storage account itself.

But it should not be treated as a replacement for:

  • Data access controls
  • Microsoft Entra authentication
  • Azure RBAC
  • Storage authorization
  • Backup
  • Soft delete
  • Versioning
  • Immutable storage where appropriate
  • Data-plane security controls

The lock protects the resource management operation.

Other controls protect the data.


13. Why Use CanNotDelete?

CanNotDelete is useful when:

  • Administrators need to continue modifying the resource
  • The resource must not be accidentally deleted
  • Normal operational management must continue
  • A production resource is business-critical

Example

A company has a production database that needs regular configuration updates.

The organization wants administrators to continue making approved changes but wants to prevent accidental deletion.

A CanNotDelete lock is appropriate.

The administrator can modify the resource but cannot delete it.


14. Why Use ReadOnly?

ReadOnly is appropriate when the resource should not be changed through the Azure Resource Manager control plane.

Examples might include:

  • A highly stable production resource
  • A critical networking component during a controlled period
  • A resource that should be temporarily frozen
  • A resource where configuration changes must be prevented

However, ReadOnly should be used carefully.

It is significantly more restrictive than CanNotDelete.


15. ReadOnly Can Break Operations

A common mistake is to assume that a ReadOnly lock is harmless because it only prevents direct modifications.

Some Azure operations that appear to be read or indirectly related to a resource can require control-plane write operations.

Consequently, applying ReadOnly can interfere with normal service functionality.

For example, some service operations may need to update configuration, create child resources, or perform other control-plane operations.

Therefore:

Use ReadOnly only when you understand the operational consequences for the service.

This is an important real-world security principle and can appear in scenario-based exam questions.


16. Resource Locks and Resource Groups

Resource-group-level locks require particular attention.

Suppose:

ProductionRG
│
├── VM
├── Storage Account
├── Key Vault
└── SQL Server

You apply:

CanNotDelete

to ProductionRG.

The resources inherit the protection.

An attempt to delete the resource group is blocked because deleting the resource group would require deleting its contained resources.

Importantly, the deletion operation doesn’t simply delete everything that isn’t individually locked while leaving locked resources behind.

The lock blocks the overall deletion operation.


17. Resource Locks and Resource Group Deletion

Consider:

ProductionRG
│
├── Resource A
├── Resource B
└── Resource C

If the resource group has a CanNotDelete lock, attempting to delete ProductionRG is blocked.

This is true even if some individual resources don’t have their own locks.

The parent-level lock protects the scope and its resources.

Exam takeaway

If a scenario says:

“Prevent the resource group and all resources within it from being accidentally deleted.”

A CanNotDelete lock at the resource-group level is a strong candidate.


18. Resource Locks and RBAC Assignments

A particularly important operational consideration is that a CanNotDelete lock can also prevent deletion of Azure RBAC role assignments associated with the locked resource or scope.

This is another reason resource locks should be planned carefully.

A lock isn’t simply a protection mechanism for the resource itself; it can affect related control-plane operations.

Therefore, before applying a lock, administrators should understand what operations are required to manage the resource and its associated configuration.


19. Resource Locks and Azure Backup

Resource locks can also affect Azure Backup operations.

For example, a CanNotDelete lock on a resource group created by Azure Backup can prevent the service from deleting old restore points.

This can cause backup-related operational problems because the service may be unable to perform its normal cleanup.

Exam lesson

Don’t assume:

“A resource lock can always be safely applied to any resource group.”

Instead, consider:

  • What services manage resources in the scope?
  • Do those services need to delete resources?
  • Do they need to modify resources?
  • Will the lock interfere with lifecycle operations?

Security controls must be designed with service dependencies in mind.


20. Resource Locks and Azure Machine Learning

Another example of an operational consequence involves Azure Machine Learning.

A CanNotDelete lock on a resource group containing an Azure Machine Learning workspace can interfere with autoscaling of compute clusters.

The service may need to remove unused nodes, and the lock can prevent the required deletion operations.

This can result in unused compute resources remaining active.

The broader lesson is:

A lock can protect resources but can also interfere with automated service operations that require deletion or modification.


21. Resource Locks and Deployment History

A CanNotDelete lock on a resource group or subscription can also affect automatic cleanup of Azure Resource Manager deployment history.

Azure Resource Manager can automatically remove older deployment records.

If the applicable scope has a CanNotDelete lock, the deployment history cannot be automatically deleted in the normal way.

This can eventually cause deployment problems if deployment history reaches its limit.

Therefore, locks can have consequences beyond the obvious “prevent resource deletion” behavior.


22. Who Can Create or Delete Resource Locks?

Resource locks are themselves Azure resources and require appropriate authorization.

Permissions to create or delete management locks are associated with actions such as:

Microsoft.Authorization/*

or

Microsoft.Authorization/locks/*

Roles such as Owner and User Access Administrator have the required permissions in the relevant contexts.

Specialized roles may also provide the necessary permissions.

Important distinction

Having permission to modify a resource does not necessarily mean that you can remove a resource lock.

Lock management requires appropriate authorization to manage locks.

This helps prevent a normal resource administrator from simply bypassing the protection.


23. Removing a Resource Lock

A resource lock must be removed before a protected operation can be performed when the lock blocks that operation.

For example:

CanNotDelete Lock
↓
Delete resource
↓
Operation blocked
↓
Authorized administrator removes lock
↓
Delete resource

The ability to remove the lock itself requires appropriate permissions.

This creates an additional administrative boundary around highly sensitive resources.


24. Creating Resource Locks in the Azure Portal

A resource lock can be configured through the Azure portal.

For a resource or resource group, the general process is:

  1. Open the resource or resource group.
  2. Select Locks.
  3. Select Add.
  4. Enter a lock name.
  5. Select the lock type:
    • Delete
    • Read-only
  6. Optionally provide notes.
  7. Create the lock.

The portal terminology maps to the Azure Resource Manager lock levels:

PortalARM Lock Level
DeleteCanNotDelete
Read-onlyReadOnly

25. Creating Locks with Azure CLI

Resource locks can also be managed through Azure CLI.

For example, a CanNotDelete lock on a resource can be created with a command conceptually similar to:

az resource lock create \
--lock-type CanNotDelete \
--name ProductionLock \
--resource-group ProductionRG \
--resource MyStorageAccount \
--resource-type Microsoft.Storage/storageAccounts

A read-only lock can similarly be created by specifying:

--lock-type ReadOnly

The important exam concept isn’t memorizing every CLI parameter.

Instead, understand that Azure CLI supports both:

  • CanNotDelete
  • ReadOnly

and can apply them at appropriate scopes.


26. Creating Locks with Azure PowerShell

Azure PowerShell also supports resource locks.

For example:

New-AzResourceLock `
-LockName ProductionLock `
-LockLevel CanNotDelete `
-ResourceGroupName ProductionRG

You can use PowerShell commands such as:

  • New-AzResourceLock
  • Get-AzResourceLock
  • Remove-AzResourceLock

to manage locks.

Again, for SC-500, understanding the purpose and behavior is generally more important than memorizing every command parameter.


27. Resource Locks with ARM Templates and Bicep

Resource locks can also be deployed programmatically using infrastructure as code.

The resource type is:

Microsoft.Authorization/locks

For example, a Bicep resource can conceptually specify:

resource createRgLock 'Microsoft.Authorization/locks@2016-09-01' = {
name: 'productionLock'
properties: {
level: 'CanNotDelete'
notes: 'Protect production resources from accidental deletion.'
}
}

This allows resource-lock configuration to become part of a repeatable infrastructure deployment process.

However, teams should carefully consider lifecycle management.

For example, if the same deployment is responsible for creating the lock and later modifying or deleting the protected resource, the deployment process must have the necessary permissions and be designed to account for the lock.


28. Resource Locks and Infrastructure as Code

Resource locks can be useful as part of a defense-in-depth strategy.

For example:

Infrastructure as Code
↓
Azure Policy
↓
RBAC
↓
Resource Lock
↓
Protected Resource

Each control addresses a different concern.

Infrastructure as code

Provides repeatable and controlled deployments.

Azure Policy

Enforces organizational configuration requirements.

RBAC

Controls who can perform actions.

Resource locks

Prevent deletion or modification at the locked scope.

No single control should be treated as a complete security solution.


29. Resource Locks Are Not a Replacement for Azure Policy

Resource locks and Azure Policy solve different problems.

Resource lock

Protects a specific scope from deletion or modification.

Azure Policy

Evaluates resources against organizational rules and can audit or enforce compliance.

For example:

Requirement:

All storage accounts must use approved network configurations.

Azure Policy is appropriate because the requirement needs to be evaluated across resources.

Requirement:

Prevent accidental deletion of this production storage account.

A resource lock is appropriate.

Easy distinction

Policy asks: “Does this resource meet the required configuration?”

Lock asks: “Can this resource be deleted or modified?”


30. Resource Locks and Tags

Tags and resource locks serve very different purposes.

Tags

Provide metadata for:

  • Organization
  • Cost management
  • Ownership
  • Environment classification
  • Automation

Locks

Restrict control-plane operations.

A tag such as:

Environment = Production

doesn’t protect a resource from deletion.

A CanNotDelete lock does.


31. Resource Locks and Resource Health

Resource locks also shouldn’t be confused with resource health or monitoring capabilities.

A lock doesn’t:

  • Detect attacks
  • Detect malware
  • Monitor availability
  • Encrypt data
  • Back up data
  • Detect vulnerabilities
  • Replace security monitoring

Its purpose is much narrower:

Prevent specified management operations against a resource or scope.


32. Choosing the Correct Lock

A useful decision framework is:

Requirement 1

“Administrators must be able to modify the resource, but nobody should be able to delete it.”

Use: CanNotDelete


Requirement 2

“The resource should not be modified or deleted.”

Use: ReadOnly


Requirement 3

“Only this one resource must be protected.”

Apply the lock directly to the resource.


Requirement 4

“All resources in this resource group should be protected from deletion.”

Apply a CanNotDelete lock to the resource group.


Requirement 5

“Prevent resources from being deployed with insecure configurations.”

Consider Azure Policy rather than a resource lock.


Requirement 6

“Protect blob data from unauthorized deletion.”

Don’t rely solely on a resource lock.

Use appropriate data-plane controls and data-protection features.


33. Common Resource Lock Exam Traps

Trap 1: “Owner can always delete the resource.”

Not necessarily.

A resource lock can prevent deletion even when the user has sufficient RBAC permissions.


Trap 2: “CanNotDelete prevents modifications.”

Incorrect.

CanNotDelete permits authorized users to modify the resource.

It prevents deletion.


Trap 3: “ReadOnly only prevents deletion.”

Incorrect.

ReadOnly prevents both modification and deletion through applicable control-plane operations.


Trap 4: “A storage account lock prevents users from deleting blobs.”

Not necessarily.

Resource locks apply to control-plane operations and aren’t a universal data-plane protection mechanism.


Trap 5: “A resource-group lock protects only the resource group.”

Not exactly.

Locks applied at a parent scope can be inherited by resources within that scope.


Trap 6: “Locks are inherited upward.”

Incorrect.

Inheritance flows downward from a parent scope to child resources.


Trap 7: “Resource locks replace RBAC.”

Incorrect.

RBAC controls authorization.

Locks impose additional management restrictions.


Trap 8: “ReadOnly is always better because it provides stronger security.”

Not necessarily.

ReadOnly can interfere with legitimate service operations.

The appropriate lock depends on the required operational behavior.


Trap 9: “Resource locks protect against every kind of deletion.”

Incorrect.

The lock applies to Azure Resource Manager control-plane operations. Data-plane operations can behave differently.


Trap 10: “A resource lock automatically protects backups.”

Incorrect.

Locks can actually interfere with Azure Backup lifecycle operations if the backup service needs to delete or modify resources.


34. Best Practices for Resource Locks

1. Use CanNotDelete for critical resources that still require routine administration

This provides protection against accidental deletion without preventing normal configuration changes.

2. Use ReadOnly sparingly

ReadOnly is highly restrictive and can interfere with service operations.

3. Apply locks at the narrowest practical scope

Don’t automatically lock an entire subscription when protecting one resource is sufficient.

4. Document locks

Use meaningful lock names and notes explaining why the lock exists.

5. Consider service dependencies

Before locking a resource group, determine whether Azure services need to create, modify, or delete resources within it.

6. Don’t use locks as a substitute for data protection

Combine locks with appropriate:

  • RBAC
  • Data-plane authorization
  • Backup
  • Soft delete
  • Versioning
  • Immutability
  • Monitoring

7. Combine locks with Azure Policy

Use Policy for configuration governance and locks for resource protection.

8. Review locks periodically

An outdated lock can become an operational problem.

9. Establish a controlled lock-removal process

Because removing a lock can enable destructive operations, lock removal should be appropriately governed.

10. Use infrastructure as code when appropriate

For environments where locks are part of the intended architecture, consider managing them consistently through deployment automation.


35. Resource Locks: Quick Reference

RequirementRecommended Approach
Prevent resource deletionCanNotDelete
Prevent resource modification and deletionReadOnly
Allow normal configuration changes but prevent deletionCanNotDelete
Protect an entire resource groupLock the resource group
Protect a single critical resourceLock the resource
Protect resources across a subscriptionSubscription-level lock, used carefully
Prevent insecure configurationsAzure Policy
Control who can manage resourcesAzure RBAC
Protect data from data-plane deletionData-plane security/data protection controls
Protect against accidental resource deletionResource lock
Allow users to read but not modify the resourceReadOnly

36. SC-500 Exam Review

Before taking the exam, make sure you can answer the following questions.

What is a resource lock?

A management control that prevents deletion or modification of Azure resources at a specified scope.

What are the two lock types?

  • CanNotDelete
  • ReadOnly

What does CanNotDelete do?

Allows authorized users to read and modify the resource but prevents deletion.

What does ReadOnly do?

Allows reading but prevents modification and deletion through applicable control-plane operations.

Does a resource lock override RBAC permissions?

A lock can restrict operations even when a user otherwise has sufficient RBAC permissions.

Where can locks be applied?

At subscription, resource group, or resource scope.

Are locks inherited?

Yes. Locks applied at a parent scope can be inherited by child resources.

Which lock takes precedence if multiple locks apply?

The most restrictive applicable lock.

Do locks protect data-plane operations?

No. Resource locks primarily apply to Azure Resource Manager control-plane operations.

Does CanNotDelete allow modifications?

Yes.

Does ReadOnly prevent deletion?

Yes.

Should ReadOnly be used everywhere?

No. It can interfere with legitimate service operations.

Do locks replace Azure Policy?

No.

Do locks replace RBAC?

No.

Do locks replace backup and data-protection controls?

No.


Practice Exam Questions

Question 1

A company has a production Azure SQL database that must remain available for administrators to modify its configuration. However, the company wants to prevent the database from being accidentally deleted.

Which resource lock should you apply?

A. ReadOnly

B. CanNotDelete

C. Audit

D. Deny

Correct Answer: B

Explanation

A CanNotDelete lock allows authorized users to read and modify the resource while preventing deletion.

A ReadOnly lock would also prevent configuration modifications, making it too restrictive for this scenario.


Question 2

An administrator has the Owner role on an Azure resource group. The resource group has a CanNotDelete management lock.

The administrator attempts to delete the resource group.

What happens?

A. The resource group is deleted because Owner always overrides locks

B. The administrator is prompted to provide a second MFA credential

C. The deletion succeeds, but the resources inside the resource group remain

D. The deletion is blocked by the resource lock

Correct Answer: D

Explanation

A management lock can restrict operations even when the user has sufficient RBAC permissions.

The CanNotDelete lock prevents deletion of the locked scope.

An Owner role does not automatically bypass a resource lock.


Question 3

A security engineer wants to protect a critical production resource from both accidental modification and accidental deletion through Azure Resource Manager.

Which lock should be used?

A. ReadOnly

B. CanNotDelete

C. AuditIfNotExists

D. Deny

Correct Answer: A

Explanation

A ReadOnly lock prevents both modification and deletion of the resource through applicable control-plane operations while allowing it to be read.

CanNotDelete would still allow authorized users to modify the resource.


Question 4

An organization applies a CanNotDelete lock to a resource group containing several production resources.

What is the expected effect?

A. Only the resource group name becomes read-only

B. Users can no longer read any resources in the resource group

C. Resources within the resource group inherit the applicable deletion protection

D. Azure Policy is automatically assigned to every resource

Correct Answer: C

Explanation

Resource locks applied to a parent scope can be inherited by child resources.

A CanNotDelete lock on a resource group therefore protects resources within that scope from applicable deletion operations.

It doesn’t prevent reading, and it doesn’t automatically create an Azure Policy assignment.


Question 5

A security administrator applies a CanNotDelete lock to an Azure Storage account. A user with appropriate data-plane permissions subsequently deletes a blob stored in the account.

Why can this occur?

A. CanNotDelete locks only work for virtual machines

B. The lock protects Azure Resource Manager control-plane operations, not all data-plane operations

C. Storage accounts cannot have resource locks

D. Blob deletion always bypasses Azure RBAC

Correct Answer: B

Explanation

Resource locks primarily protect control-plane operations.

Blob operations are data-plane operations and are governed by data-plane authorization and data-protection mechanisms.

Therefore, a resource lock should not be considered a universal mechanism for protecting data stored inside the resource.


Question 6

A company has a resource group containing resources managed by Azure Backup. An administrator wants to apply a CanNotDelete lock to the resource group.

What should the administrator consider before applying the lock?

A. The lock automatically increases backup storage capacity

B. The lock converts all backup data to immutable storage

C. The lock has no effect on Azure Backup

D. The lock can interfere with backup lifecycle operations that require deletion of resources such as old restore points

Correct Answer: D

Explanation

A CanNotDelete lock can prevent Azure Backup from performing required cleanup operations.

Therefore, resource locks must be evaluated for operational side effects before being applied to resource groups managed by Azure services.


Question 7

A company has a CanNotDelete lock on a resource group. Administrators can still modify resources within the group, but they cannot delete them.

The security team now wants to prevent configuration changes as well.

What should they do?

A. Replace the lock with a ReadOnly lock

B. Add an Azure tag

C. Change the RBAC role to Reader for every resource

D. Enable Microsoft Sentinel

Correct Answer: A

Explanation

A ReadOnly lock prevents both modification and deletion through applicable control-plane operations.

A CanNotDelete lock only prevents deletion.


Question 8

A security engineer is designing governance controls for an Azure environment.

The organization has two requirements:

  1. Prevent developers from deploying resources that violate required security configurations.
  2. Prevent accidental deletion of a critical production database.

Which combination should the engineer consider?

A. Resource lock for both requirements

B. Microsoft Sentinel for both requirements

C. Azure Policy for the first requirement and a resource lock for the second

D. RBAC alone for both requirements

Correct Answer: C

Explanation

Azure Policy is appropriate for evaluating and enforcing resource configuration requirements.

A resource lock is appropriate for protecting a critical resource against deletion.

The two controls address different governance problems and can be used together.


Question 9

A resource has a CanNotDelete lock directly applied to it. Its parent resource group has a ReadOnly lock.

Which lock behavior applies to the resource?

A. CanNotDelete because the resource-level lock always overrides the parent

B. No lock because multiple locks cancel each other

C. ReadOnly because the most restrictive applicable lock takes precedence

D. The resource becomes unlocked because only subscription locks are inherited

Correct Answer: C

Explanation

Locks can be inherited from parent scopes, and when multiple locks apply, the most restrictive lock takes precedence.

ReadOnly is more restrictive than CanNotDelete because it prevents both modification and deletion.


Question 10

A security team wants to protect an Azure resource from accidental deletion. The team also wants administrators to be able to perform normal configuration changes.

Which solution best meets the requirement?

A. Apply a ReadOnly lock

B. Apply a CanNotDelete lock

C. Assign the Reader role to administrators

D. Apply an Azure Policy with a Deny effect to the resource

Correct Answer: B

Explanation

A CanNotDelete lock is specifically designed for this scenario.

It prevents deletion while allowing authorized users to modify the resource.

A ReadOnly lock would prevent the required configuration changes. The Reader role would also prevent administrators from making those changes. Azure Policy with Deny is primarily intended for enforcing configuration rules rather than simply protecting a particular resource from deletion.


Final SC-500 Takeaways

The most important concepts to remember for Implement resource locks are:

  1. Resource locks protect Azure resources from accidental deletion or modification.
  2. Locks can be applied at the subscription, resource group, or resource scope.
  3. The two primary lock types are CanNotDelete and ReadOnly.
  4. CanNotDelete allows reading and modification but prevents deletion.
  5. ReadOnly allows reading but prevents modification and deletion.
  6. Resource locks can restrict operations even when the user has sufficient RBAC permissions.
  7. Locks applied at a parent scope can be inherited by child resources.
  8. When multiple locks apply, the most restrictive lock takes precedence.
  9. Resource locks primarily affect control-plane operations.
  10. A resource lock does not automatically protect data-plane data such as blobs or database records.
  11. Resource locks do not replace Azure RBAC.
  12. Resource locks do not replace Azure Policy.
  13. Use Azure Policy to govern resource configurations and use resource locks to protect resources from deletion or modification.
  14. Use CanNotDelete when administrators must continue modifying the resource.
  15. Use ReadOnly when both modification and deletion must be prevented.
  16. Apply locks carefully because they can interfere with automated Azure service operations.
  17. In particular, locks can affect services such as Azure Backup and other services that need to modify or delete resources.
  18. A resource-group-level lock can prevent deletion of the entire resource group and its contents.
  19. Managing locks requires appropriate authorization to manage Azure management locks.
  20. Resource locks are one component of a broader defense-in-depth governance strategy.

The key exam rule to remember

CanNotDelete = Read + Modify, but NO Delete

ReadOnly = Read, but NO Modify and NO Delete

And perhaps the most important conceptual distinction:

Azure Policy governs what configurations are allowed; RBAC controls who is authorized to perform actions; resource locks prevent specified management operations on protected scopes.


Go to the SC-500 Exam Prep Hub main page

Create configuration files for Data API builder (DAB) – Part 1 (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
      --> Create configuration files for Data API builder (DAB)


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 application development increasingly relies on APIs rather than direct database connectivity. Instead of allowing client applications to connect directly to a SQL database, developers commonly expose database functionality through secure REST or GraphQL APIs. Microsoft Data API builder (DAB) is designed specifically for this purpose.

Data API builder is an open-source Microsoft tool that automatically creates secure REST and GraphQL endpoints over Azure SQL Database, SQL Server, Azure Database for PostgreSQL, Azure Cosmos DB, and several other supported databases—all from a single configuration file.

Rather than writing thousands of lines of API code, developers describe their database and security requirements in a configuration file. DAB then generates the API automatically.

For the DP-800 certification exam, candidates should understand how to:

  • Create DAB configuration files
  • Configure data sources
  • Define entities
  • Configure REST endpoints
  • Configure GraphQL endpoints
  • Secure APIs
  • Configure authentication
  • Deploy DAB in Azure
  • Manage permissions
  • Configure environment-specific settings

What is Data API Builder?

Data API builder (DAB) is a lightweight API engine that exposes database objects as secure REST and GraphQL endpoints.

Instead of building APIs manually using ASP.NET Core or Node.js, developers configure DAB using a JSON configuration file.

Example:

Database Table

Customers

Automatically becomes

REST

GET /api/Customers

GraphQL

query
{
customers
{
CustomerID
Name
}
}

No custom API coding is required.


Why Microsoft Created Data API Builder

Traditional API development often requires developers to:

  • Design endpoints
  • Write controllers
  • Create models
  • Configure authentication
  • Build CRUD operations
  • Handle serialization
  • Create GraphQL schemas
  • Maintain documentation

This can take weeks.

Data API builder automates these tasks through configuration.

Benefits include:

  • Faster development
  • Less code
  • Standardized APIs
  • Secure default behavior
  • Easy Azure deployment
  • Automatic GraphQL support
  • Automatic OpenAPI generation (REST)

Where DAB Fits in Azure Architecture

Application
│
▼
Data API Builder
│
▼
Azure SQL Database

Instead of:

Application
│
ASP.NET API
│
Business Layer
│
Repository Layer
│
Entity Models
│
Azure SQL

DAB dramatically reduces application complexity.


Configuration-Driven Development

Everything DAB does is controlled through a configuration file.

The configuration file defines:

  • Database connection
  • Authentication
  • API routes
  • GraphQL schema
  • REST routes
  • Permissions
  • Relationships
  • Stored procedures

This makes the API reproducible and source-control friendly.


Creating a Configuration File

A new configuration file can be created using the DAB CLI.

Example

dab init

This generates a starter configuration file.

Example

dab-config.json

This file becomes the central definition of the API.


Typical Configuration File Structure

A simplified configuration looks like this:

{
"data-source": {
},
"runtime": {
},
"entities": {
}
}

Everything inside these three sections controls the behavior of DAB.


Major Sections of the Configuration File

The most important sections are:

  • data-source
  • runtime
  • entities

Each serves a distinct purpose.


The Data Source Section

The data source defines where the database resides.

Example

"data-source": {
}

Typical information includes:

  • Database type
  • Connection string
  • Database name
  • Authentication method

Example database types

  • SQL Server
  • Azure SQL Database
  • PostgreSQL
  • Azure Cosmos DB

Configuring the Database Type

Example

"database-type": "mssql"

Common supported values

  • mssql
  • postgresql
  • cosmosdb

For DP-800, SQL Server and Azure SQL are the primary focus.


Configuring the Connection String

Example

"connection-string": "@env('SQL_CONNECTION_STRING')"

Notice that the connection string references an environment variable rather than storing credentials directly.

This is considered a security best practice.


Why Environment Variables Are Preferred

Avoid this:

"connection-string":
"Server=myserver;
User=admin;
Password=P@ssword123"

Prefer this:

@env("SQL_CONNECTION_STRING")

Benefits include:

  • No passwords in source control
  • Easier deployment
  • Different environments use different values
  • Improved security

Runtime Configuration

The runtime section controls how the API behaves.

Example

"runtime": {
}

This section contains:

  • REST settings
  • GraphQL settings
  • Host configuration
  • Authentication
  • CORS
  • Logging

Runtime REST Configuration

Example

"rest": {
"enabled": true
}

REST endpoints become available automatically.

Example

GET /api/Products

Runtime GraphQL Configuration

Example

"graphql": {
"enabled": true
}

GraphQL becomes available at

/graphql

Runtime Host Configuration

Example

"host": {
"mode": "development"
}

Common modes include

  • Development
  • Production

Production mode disables many development features.


Authentication Configuration

The runtime section also defines authentication.

Example

"authentication": {
}

Authentication options may include:

  • Anonymous
  • Static Web Apps Authentication
  • Microsoft Entra ID
  • JWT
  • OAuth

Why Authentication Matters

Without authentication:

Anyone can access the API.

With authentication:

  • Users are identified
  • Roles are assigned
  • Permissions are enforced
  • Sensitive data remains protected

Authentication is one of the most tested DAB concepts on the DP-800 exam.


Entities

The most important section is the entity configuration.

Entities represent:

  • Tables
  • Views
  • Stored procedures

Example

"entities": {
}

Each entity becomes one or more API endpoints.


Example Entity

"Products": {
}

This creates

REST

/api/Products

GraphQL

products

Configuring the Source Object

Example

"source": {
"object": "dbo.Products",
"type": "table"
}

The object tells DAB which SQL object to expose.

Supported object types include

  • Table
  • View
  • Stored Procedure

Entity REST Configuration

Example

"rest": {
"enabled": true
}

REST endpoints become available automatically.

Examples

GET /api/Products
POST /api/Products
PUT /api/Products
DELETE /api/Products

depending on permissions.


Custom REST Paths

Instead of

/api/Products

you can configure

/api/catalog

Example

"path": "catalog"

This creates cleaner URLs.


Entity GraphQL Configuration

Example

"graphql": {
"enabled": true
}

GraphQL queries become available.

Example

query
{
products
{
ProductID
Name
}
}

Configuring Relationships

DAB can automatically expose database relationships.

Example

Customers
Orders

Relationship

CustomerID

GraphQL can then retrieve

Customer
Orders

in a single query.

This greatly reduces application complexity.


Stored Procedure Support

Entities may expose stored procedures.

Example

"type": "stored-procedure"

Stored procedures are commonly used for

  • Complex business logic
  • Reporting
  • Batch processing
  • Controlled updates

Environment-Specific Configuration

Different environments often require different settings.

Typical environments include:

  • Development
  • Test
  • QA
  • Staging
  • Production

Rather than maintaining separate configuration files, DAB commonly relies on environment variables.

For example:

Development

SQL_CONNECTION_STRING

points to a local SQL Server.

Production

The same variable name points to an Azure SQL Database.

This approach allows the same configuration file to be deployed across environments while changing only the environment variables.


Common Deployment Scenarios

DP-800 candidates should recognize the most common places where Data API builder is hosted.

Azure App Service

A popular option for enterprise applications. DAB runs as a web application and connects securely to Azure SQL Database.

Azure Container Apps

Suitable for containerized deployments that require scalability and simplified management.

Azure Kubernetes Service (AKS)

Used in large enterprise environments requiring orchestration, high availability, and microservices architectures.

Azure Static Web Apps

Frequently paired with DAB to provide secure APIs for modern JavaScript applications.

Local Development

Developers commonly test DAB locally before deploying to Azure.


Security Best Practices When Creating Configuration Files

When creating DAB configuration files, Microsoft recommends several best practices:

  • Never hardcode passwords or connection strings.
  • Store secrets in environment variables or Azure Key Vault.
  • Use Microsoft Entra ID or Managed Identity whenever possible.
  • Grant only the minimum required database permissions.
  • Disable anonymous access unless explicitly required.
  • Expose only the entities that applications need.
  • Restrict CRUD operations based on user roles.
  • Use HTTPS for all deployments.
  • Keep configuration files under source control while excluding secrets.
  • Regularly review and update authentication and authorization settings.

DP-800 Exam Tips

  • Understand that the configuration file is the core of Data API builder.
  • Be able to identify the purpose of the data-source, runtime, and entities sections.
  • Know how to configure REST and GraphQL endpoints.
  • Understand why environment variables are preferred over hardcoded connection strings.
  • Recognize how tables, views, and stored procedures are exposed as entities.
  • Understand how authentication settings affect API security.
  • Be familiar with common Azure hosting options for DAB.
  • Expect scenario-based questions asking which configuration changes are needed to expose or secure database objects.

Go to the DP-800 Exam Prep Hub main page

Describe Azure Cosmos DB APIs (DP-900 Exam Prep)

This post is a part of the DP-900: Microsoft Azure Data Fundamentals Exam Prep Hub. 
This topic falls under these sections:
Describe considerations for working with non-relational data on Azure (15–20%)
--> Describe Capabilities and Features of Azure Cosmos DB
--> Describe Azure Cosmos DB APIs


Note that there are 10 practice questions (with answers and explanations) for each section to help you solidify your knowledge of the material. Also, there are 2 practice tests with 60 questions each available on the hub below the exam topics section.

Azure Cosmos DB supports multiple APIs that allow developers to interact with the database using different data models and familiar query languages.

For the DP-900 exam, you should understand what these APIs are, how they differ, and when to use each one.


What Are Azure Cosmos DB APIs?

APIs in Azure Cosmos DB define:

  • How data is structured
  • How it is queried
  • Which tools and SDKs are used

✔ Each API provides a different way to interact with the same underlying Cosmos DB service.


Why Multiple APIs?

Azure Cosmos DB supports multiple APIs to:

  • Allow developers to use familiar tools
  • Enable easy migration from existing systems
  • Support different types of applications and data models

💡 Key idea:
👉 Choose the API based on your application’s existing technology or data model


Core Azure Cosmos DB APIs


1. Core (SQL) API

Also known as the SQL API.

Key Features

  • Uses a SQL-like query language
  • Stores data as JSON documents
  • Most commonly used API

Use Cases

  • New application development
  • General-purpose NoSQL workloads

✔ Best for: Developers familiar with SQL who want flexibility


2. MongoDB API

Key Features

  • Compatible with MongoDB drivers and tools
  • Uses MongoDB query syntax

Use Cases

  • Migrating existing MongoDB applications
  • Applications already using MongoDB

✔ Best for: MongoDB workloads moving to Azure


3. Cassandra API

Key Features

  • Compatible with Apache Cassandra
  • Supports Cassandra Query Language (CQL)

Use Cases

  • Large-scale distributed workloads
  • Applications using Cassandra

✔ Best for: Cassandra-based systems needing cloud scalability


4. Table API

Key Features

  • Similar to Azure Table Storage
  • Key-value data model
  • Uses OData-based queries

Use Cases

  • Simple key-value workloads
  • Applications already using Table Storage

✔ Best for: Lightweight, scalable key-value scenarios


5. Gremlin API

Key Features

  • Supports graph data models
  • Uses Gremlin query language

Use Cases

  • Graph-based applications
  • Relationship-heavy data

✔ Best for: Social networks, recommendation engines, network analysis


Key Differences Between APIs

APIData ModelQuery LanguageBest For
Core (SQL)Document (JSON)SQL-likeGeneral-purpose apps
MongoDBDocumentMongoDB queryMongoDB migration
CassandraWide-columnCQLDistributed systems
TableKey-valueODataSimple scalable storage
GremlinGraphGremlinRelationship-based data

Important Concepts for DP-900


1. Same Service, Different Interfaces

All APIs run on Azure Cosmos DB, but:

  • Each API has its own endpoint
  • Each uses different query syntax
  • Each supports different SDKs

2. API Choice Is Permanent

  • You choose the API when creating a Cosmos DB account
  • You cannot switch APIs later

3. Performance and Features Are Shared

  • Global distribution
  • Low latency
  • High availability
  • Scalability

✔ These benefits apply regardless of API choice.


When to Choose Each API

  • Core (SQL) API → Default choice for most applications
  • MongoDB API → Existing MongoDB apps
  • Cassandra API → Distributed, large-scale systems
  • Table API → Simple key-value workloads
  • Gremlin API → Graph relationships

Why This Matters for DP-900

On the exam, you may be asked to:

  • Identify the correct API for a scenario
  • Match APIs to data models
  • Understand why multiple APIs exist
  • Recognize migration scenarios

Summary — Exam-Relevant Takeaways

✔ Azure Cosmos DB supports multiple APIs:

  • Core (SQL) API
  • MongoDB API
  • Cassandra API
  • Table API
  • Gremlin API

✔ Each API:

  • Uses a different data model
  • Has its own query language

✔ Key concept:
👉 Choose the API based on your application’s needs or existing system

✔ Important:

  • API choice is fixed at creation
  • All APIs benefit from Cosmos DB features (scalability, global distribution)

Go to the Practice Exam Questions for this topic.

Go to the DP-900 Exam Prep Hub main page.

Practice Questions: Describe the Azure SQL family of products including Azure SQL Database, Azure SQL Managed Instance, and SQL Server on Azure Virtual Machines (DP-900 Exam Prep)

Practice Questions


Question 1

Which Azure SQL offering is fully managed and requires the least administrative effort?

A. SQL Server on Azure Virtual Machines
B. Azure SQL Managed Instance
C. Azure SQL Database
D. Azure Synapse Analytics

✅ Answer: C

Explanation:
Azure SQL Database is a fully managed PaaS service with minimal administration.


Question 2

Which Azure SQL service provides the highest level of compatibility with on-premises SQL Server while still being a PaaS solution?

A. Azure SQL Database
B. Azure SQL Managed Instance
C. SQL Server on Azure Virtual Machines
D. Azure Cosmos DB

✅ Answer: B

Explanation:
Azure SQL Managed Instance offers near 100% compatibility with SQL Server.


Question 3

Which Azure SQL option allows full control over the operating system?

A. Azure SQL Database
B. Azure SQL Managed Instance
C. SQL Server on Azure Virtual Machines
D. Azure SQL Elastic Pool

✅ Answer: C

Explanation:
SQL Server on Azure VM is an IaaS offering, giving full OS-level control.


Question 4

Which service is BEST suited for a cloud-native application with minimal management overhead?

A. SQL Server on Azure Virtual Machines
B. Azure SQL Managed Instance
C. Azure SQL Database
D. Azure Data Lake

✅ Answer: C

Explanation:
Azure SQL Database is optimized for modern cloud applications.


Question 5

Which Azure SQL service supports instance-level features such as SQL Agent?

A. Azure SQL Database
B. Azure SQL Managed Instance
C. SQL Server on Azure Virtual Machines
D. Azure Blob Storage

✅ Answer: B

Explanation:
Managed Instance supports many instance-level features not available in Azure SQL Database.


Question 6

A company wants to migrate an existing SQL Server database with minimal changes. Which service should they choose?

A. Azure SQL Database
B. Azure SQL Managed Instance
C. SQL Server on Azure Virtual Machines
D. Azure Synapse Analytics

✅ Answer: B

Explanation:
Managed Instance is designed for lift-and-shift migrations with high compatibility.


Question 7

Which Azure SQL option requires you to manage backups, updates, and patching?

A. Azure SQL Database
B. Azure SQL Managed Instance
C. SQL Server on Azure Virtual Machines
D. Azure SQL Elastic Pool

✅ Answer: C

Explanation:
In IaaS (Azure VM), the customer is responsible for management tasks.


Question 8

Which of the following best describes Platform as a Service (PaaS) in the Azure SQL family?

A. Full control over hardware and OS
B. No database management required at all
C. Azure manages infrastructure and database maintenance
D. Only supports non-relational data

✅ Answer: C

Explanation:
PaaS handles infrastructure, patching, backups, and high availability.


Question 9

Which Azure SQL service is MOST appropriate when you need maximum control and customization?

A. Azure SQL Database
B. Azure SQL Managed Instance
C. SQL Server on Azure Virtual Machines
D. Azure SQL Elastic Pool

✅ Answer: C

Explanation:
SQL Server on Azure VM provides full control over configuration and environment.


Question 10

Which statement best describes the relationship between the Azure SQL family products?

A. They use completely different database engines
B. They all use the SQL Server engine with different management levels
C. Only Azure SQL Database supports SQL
D. Only SQL Server on Azure VM supports relational data

✅ Answer: B

Explanation:
All Azure SQL offerings are based on the SQL Server engine, differing mainly in management and control.


✅ Quick Exam Takeaways

✔ Azure SQL Database

  • Fully managed (PaaS)
  • Best for cloud-native apps

✔ Azure SQL Managed Instance

  • Near full SQL Server compatibility
  • Best for migrations

✔ SQL Server on Azure VM

  • Full control (IaaS)
  • You manage everything

✔ Key concept:
👉 More control = more responsibility
👉 More automation = less control


Go to the DP-900 Exam Prep Hub main page.

Identify Computer Vision Workloads (AI-900 Exam Prep)

Overview

Computer vision is a branch of Artificial Intelligence (AI) that enables machines to interpret, analyze, and understand visual information such as images and videos. In the context of the AI-900: Microsoft Azure AI Fundamentals exam, you are not expected to build complex models or write code. Instead, the focus is on recognizing computer vision workloads, understanding what problems they solve, and knowing which Azure AI services are appropriate for each scenario.

This topic falls under:

  • Describe Artificial Intelligence workloads and considerations (15–20%)
    • Identify features of common AI workloads

A strong conceptual understanding here will help you confidently answer many scenario-based exam questions.


What Is a Computer Vision Workload?

A computer vision workload involves extracting meaningful insights from visual data. These workloads allow systems to:

  • Identify objects, people, or text in images
  • Analyze facial features or emotions
  • Understand the content of photos or videos
  • Detect changes, anomalies, or motion

Common inputs include:

  • Images (JPEG, PNG, etc.)
  • Video streams (live or recorded)

Common outputs include:

  • Labels or tags
  • Bounding boxes around detected objects
  • Extracted text
  • Descriptions of image content

Common Computer Vision Use Cases

On the AI-900 exam, computer vision workloads are usually presented as real-world scenarios. Below are the most common ones you should recognize.

Image Classification

What it does: Assigns a category or label to an image.

Example scenarios:

  • Determining whether an image contains a cat, dog, or bird
  • Classifying products in an online store
  • Identifying whether a photo shows food, people, or scenery

Key idea: The entire image is classified as one or more categories.


Object Detection

What it does: Detects and locates multiple objects within an image.

Example scenarios:

  • Detecting cars, pedestrians, and traffic signs in street images
  • Counting people in a room
  • Identifying damaged items in a warehouse

Key idea: Unlike classification, object detection identifies where objects appear using bounding boxes.


Face Detection and Facial Analysis

What it does: Detects human faces and analyzes facial attributes.

Example scenarios:

  • Detecting whether a face is present in an image
  • Estimating age or emotion
  • Identifying facial landmarks (eyes, nose, mouth)

Important exam note:

  • AI-900 focuses on face detection and analysis, not facial recognition for identity verification.
  • Be aware of ethical and privacy considerations when working with facial data.

Optical Character Recognition (OCR)

What it does: Extracts printed or handwritten text from images and documents.

Example scenarios:

  • Reading text from scanned documents
  • Extracting information from receipts or invoices
  • Recognizing license plate numbers

Key idea: OCR turns unstructured visual text into machine-readable text.


Image Description and Tagging

What it does: Generates descriptive text or tags that summarize image content.

Example scenarios:

  • Automatically tagging photos in a digital library
  • Creating alt text for accessibility
  • Generating captions for images

Key idea: This workload focuses on understanding the overall context of an image rather than specific objects.


Video Analysis

What it does: Analyzes video content frame by frame.

Example scenarios:

  • Detecting motion or anomalies in security footage
  • Tracking objects over time
  • Summarizing video content

Key idea: Video analysis extends image analysis across time, not just a single frame.


Azure Services Commonly Associated with Computer Vision

For the AI-900 exam, you should recognize which Azure AI services support computer vision workloads at a high level.

Azure AI Vision

Supports:

  • Image analysis
  • Object detection
  • OCR
  • Face detection
  • Image tagging and description

This is the most commonly referenced service for computer vision scenarios on the exam.


Azure AI Custom Vision

Supports:

  • Custom image classification
  • Custom object detection

Used when prebuilt models are not sufficient and you need to train a model using your own images.


Azure AI Video Indexer

Supports:

  • Video analysis
  • Object, face, and scene detection in videos

Typically appears in scenarios involving video content.


How Computer Vision Differs from Other AI Workloads

Understanding what is not computer vision is just as important on the exam.

AI Workload TypeFocus Area
Computer VisionImages and videos
Natural Language ProcessingText and speech
Speech AIAudio and voice
Anomaly DetectionPatterns in numerical or time-series data

Exam tip: If the input data is visual (images or video), you are almost certainly dealing with a computer vision workload.


Responsible AI Considerations

Microsoft emphasizes responsible AI, and AI-900 includes high-level awareness of these principles.

For computer vision workloads, key considerations include:

  • Privacy and consent when capturing images or video
  • Avoiding bias in facial analysis
  • Transparency in how visual data is collected and used

You will not be tested on implementation details, but you may see conceptual questions about ethical use.


Exam Tips for Identifying Computer Vision Workloads

  • Focus on keywords like image, photo, video, camera, scanned document
  • Look for actions such as detect, recognize, classify, extract text
  • Match the scenario to the simplest appropriate workload
  • Remember: AI-900 tests understanding, not coding

Summary

To succeed on the AI-900 exam, you should be able to:

  • Recognize when a problem is a computer vision workload
  • Identify common use cases such as image classification, object detection, and OCR
  • Understand which Azure AI services are commonly used
  • Distinguish computer vision from other AI workloads

Mastering this topic will give you a strong foundation for many questions in the Describe Artificial Intelligence workloads and considerations domain.


Go to the Practice Exam Questions for this topic.

Go to the PL-300 Exam Prep Hub main page.

Implement Incremental Refresh for Semantic Models

This post is a part of the DP-600: Implementing Analytics Solutions Using Microsoft Fabric Exam Prep Hub; and this topic falls under these sections: 
Implement and manage semantic models (25-30%)
--> Optimize enterprise-scale semantic models
--> Implement Incremental Refresh for Semantic Models

Overview

Incremental refresh is a key optimization technique for enterprise-scale semantic models in Microsoft Fabric and Power BI. Instead of fully refreshing all data during each refresh cycle, incremental refresh allows you to refresh only new or changed data, significantly improving refresh performance, reducing resource consumption, and enabling scalability for large datasets.

In the DP-600 exam, this topic appears under Optimize enterprise-scale semantic models and focuses on when, why, and how to configure incremental refresh correctly.


What Is Incremental Refresh?

Incremental refresh is a feature for Import mode and Hybrid (Import + DirectQuery) semantic models that:

  • Partitions data based on date/time columns
  • Refreshes only a recent portion of data
  • Retains historical data without reprocessing it
  • Optionally supports real-time data using DirectQuery

Incremental refresh is not applicable to:

  • Direct Lake–only semantic models
  • Pure DirectQuery models

Key Benefits

Incremental refresh provides several enterprise-level advantages:

  • Faster refresh times for large datasets
  • Reduced memory and CPU usage
  • Improved reliability of scheduled refreshes
  • Better scalability for growing fact tables
  • Enables near-real-time analytics when combined with DirectQuery

Core Configuration Components

1. Date/Time Column Requirement

Incremental refresh requires a column that:

  • Is of type Date, DateTime, or DateTimeZone
  • Represents a monotonically increasing timeline (for example, OrderDate or TransactionDate)

This column is used to define data partitions.


2. RangeStart and RangeEnd Parameters

Incremental refresh relies on two Power Query parameters:

  • RangeStart – Beginning of the refresh window
  • RangeEnd – End of the refresh window

These parameters:

  • Must be of type Date/Time
  • Are used in a filter step in Power Query
  • Are evaluated dynamically during refresh

Exam tip: These parameters are required, not optional.


3. Refresh and Storage Policies

When configuring incremental refresh, you define two key time windows:

PolicyPurpose
Store rows from the pastDefines how much historical data is retained
Refresh rows from the pastDefines how much recent data is refreshed

Example:

  • Store data for 5 years
  • Refresh data from the last 7 days

Only the refresh window is reprocessed during each refresh.


4. Optional: Detect Data Changes

Incremental refresh can optionally use a change detection column (for example, LastModifiedDate):

  • Only refreshes partitions where data has changed
  • Reduces unnecessary refresh operations
  • Column must be reliably updated when records change

This is especially useful for slowly changing dimensions.


Incremental Refresh with Real-Time Data (Hybrid Tables)

Incremental refresh can be combined with DirectQuery to support real-time data:

  • Historical data → Import mode
  • Recent data → DirectQuery

This configuration:

  • Uses the “Get the latest data in real time” option
  • Is commonly referred to as a Hybrid table
  • Balances performance with freshness

Deployment and Execution Behavior

  • Incremental refresh is defined in Power BI Desktop
  • Partitions are created only after publishing
  • Refresh execution happens in the Fabric service
  • Desktop refresh does not create partitions

Exam tip: Many questions test the difference between design-time configuration and service-side execution.


Limitations and Considerations

  • Requires Import or Hybrid mode
  • Date column must exist in the fact table
  • Cannot be configured directly in Fabric service
  • Schema changes may require full refresh
  • Partition count should be managed to avoid excessive overhead

Common DP-600 Exam Scenarios

You may be asked to:

  • Choose incremental refresh to solve long refresh times
  • Identify missing requirements (RangeStart/RangeEnd)
  • Decide between full refresh vs incremental refresh
  • Configure refresh windows for historical vs recent data
  • Combine incremental refresh with real-time analytics

When to Use Incremental Refresh (Exam Heuristic)

Choose incremental refresh when:

  • Fact tables are large and growing
  • Only recent data changes
  • Full refresh times are too long
  • Import mode is required for performance

Avoid it when:

  • Data volume is small
  • Real-time access is required for all data
  • Using Direct Lake–only models

Exam Tips

For DP-600, remember:

  • RangeStart / RangeEnd are mandatory
  • Incremental refresh = Import or Hybrid
  • Partitions are service-side
  • Refresh window ≠ storage window
  • Hybrid tables enable real-time + performance

Summary

Incremental refresh is a foundational optimization technique for large semantic models in Microsoft Fabric. For the DP-600 exam, focus on:

  • Required parameters (RangeStart, RangeEnd)
  • Refresh vs storage windows
  • Import and Hybrid model compatibility
  • Real-time and change detection scenarios
  • Service-side execution behavior

Practice Questions:

Here are 10 questions to test and help solidify your learning and knowledge. As you review these and other questions in your preparation, make sure to …

  • Identifying and understand why an option is correct (or incorrect) — not just which one
  • Look for and understand the usage scenario of keywords in exam questions to guide you
  • Expect scenario-based questions rather than direct definitions

Question 1

You have a large fact table with 5 years of historical data. Only the most recent data changes daily. Which feature should you implement to reduce refresh time?

A. DirectQuery mode
B. Incremental refresh
C. Calculated tables
D. Composite models

✅ Correct Answer: B

Explanation:
Incremental refresh is designed to refresh only recent data while retaining historical partitions, significantly improving refresh performance for large datasets.


Question 2

Which two Power Query parameters are required to configure incremental refresh?

A. StartDate and EndDate
B. MinDate and MaxDate
C. RangeStart and RangeEnd
D. RefreshStart and RefreshEnd

✅ Correct Answer: C

Explanation:
Incremental refresh requires RangeStart and RangeEnd parameters of type Date/Time to define partition boundaries.


Question 3

Where are incremental refresh partitions actually created?

A. Power BI Desktop during data load
B. Fabric Data Factory
C. Microsoft Fabric service after publishing
D. SQL endpoint

✅ Correct Answer: C

Explanation:
Partitions are created and managed only in the Fabric service after the model is published. Desktop refresh does not create partitions.


Question 4

Which storage mode is required to use incremental refresh?

A. DirectQuery only
B. Direct Lake only
C. Import or Hybrid
D. Dual only

✅ Correct Answer: C

Explanation:
Incremental refresh works with Import mode and Hybrid tables. It is not supported for DirectQuery-only or Direct Lake–only models.


Question 5

You configure incremental refresh to store 5 years of data and refresh the last 7 days. What happens during a scheduled refresh?

A. All data is fully refreshed
B. Only the last 7 days are refreshed
C. Only the last year is refreshed
D. Only new rows are loaded

✅ Correct Answer: B

Explanation:
The refresh window defines how much data is reprocessed. Historical partitions outside that window are retained without refresh.


Question 6

Which column type is required for incremental refresh filtering?

A. Text
B. Integer
C. Boolean
D. Date/DateTime

✅ Correct Answer: D

Explanation:
Incremental refresh requires a Date, DateTime, or DateTimeZone column to define time-based partitions.


Question 7

What is the purpose of the Detect data changes option?

A. To refresh all partitions automatically
B. To detect schema changes
C. To refresh only partitions where data has changed
D. To enable real-time DirectQuery

✅ Correct Answer: C

Explanation:
Detect data changes uses a change-tracking column (e.g., LastModifiedDate) to avoid refreshing partitions when no data has changed.


Question 8

Which scenario best fits a Hybrid incremental refresh configuration?

A. All data must be queried in real time
B. Small dataset refreshed once per day
C. Historical data rarely changes, but recent data must be real time
D. Streaming data only

✅ Correct Answer: C

Explanation:
Hybrid tables combine Import for historical data and DirectQuery for recent data, providing real-time access where needed.


Question 9

What happens if the date column used for incremental refresh contains null values?

A. Incremental refresh is automatically disabled
B. Only historical partitions fail
C. Refresh may fail or produce incorrect partitions
D. Null values are ignored safely

✅ Correct Answer: C

Explanation:
The date column must be reliable. Null or invalid values can break partition logic and cause refresh failures.


Question 10

When should you avoid using incremental refresh?

A. When the dataset is large
B. When only recent data changes
C. When using Direct Lake–only semantic models
D. When refresh duration is long

✅ Correct Answer: C

Explanation:
Incremental refresh is not supported for Direct Lake–only models, as Direct Lake handles freshness differently through OneLake access.


Understanding Microsoft Fabric Shortcuts

Microsoft Fabric is a central platform for data and analytics, and one of its powerful features that supports it being an all-in-one platform is Shortcuts. Shortcuts provide a simple way to unify data across multiple locations without duplicating or moving it. This is a big deal because it saves a LOT of time and effort that is usually involved in moving data around.

What Are Shortcuts?

Shortcuts are references (or “pointers”) to data that resides in another storage location. Instead of copying the data into Fabric, a shortcut lets you access and query it as if it were stored locally.

This is especially valuable in today’s data landscape, where data often spans OneLake, Azure Data Lake Storage (ADLS), Amazon S3, or other environments.

Types of Shortcuts

There are 2 types of shortcuts: table shortcuts and file shortcuts

  1. Table Shortcuts
    • Point to existing tables in other Fabric workspaces or external sources.
    • Allow you to query and analyze the table without physically moving it.
  2. File Shortcuts
    • Point to files (e.g., Parquet, CSV, Delta Lake) stored in OneLake or other supported storage systems.
    • Useful for scenarios where files are your system of record, but you want to use them in Fabric experiences like Power BI, Data Engineering, or Data Science.

Benefits of Shortcuts

Shortcuts is a really useful feature, and here are some of its benefits:

  • No Data Duplication: Saves storage costs and avoids data sprawl.
  • Single Source of Truth: Data stays in its original location while being usable across Fabric.
  • Speed and Efficiency: Query and analyze external data in place, without lengthy ETL processes.
  • Flexibility: Works across different storage platforms and Fabric workspaces.

How and Where Shortcuts Can Be Created

  • In OneLake: You can create shortcuts directly in OneLake to link to data from ADLS Gen2, Amazon S3, or other OneLake workspaces.
  • In Fabric Experiences: Whether working in Data Engineering, Data Science, Real-Time Analytics, or Power BI, shortcuts can be created in lakehouses or KQL (Kusto Query Language) databases, and you can use them directly as data in OneLake. Any Fabric service will be able to use them without copying data from the data source.
  • In Workspaces: Shortcuts make it possible to connect across lakehouses stored in different workspaces, breaking down silos within an organization. The shortcuts can be generated from a lakehouse, warehouse, or KQL database.
  • Note that warehouses do not support the creation of shortcuts. However, you can query data stored within other warehouses and lakehouses.

How Shortcuts Can Be Used

  • Cross-Workspace Data Access: Analysts can query data in another team’s workspace without requesting a copy.
  • Data Virtualization: Data scientists can work with files stored in ADLS without having to move them into Fabric.
  • BI and Reporting: Power BI models can use shortcuts to reference external files or tables, enabling consistent reporting without duplication.
  • ETL Simplification: Instead of moving raw files into Fabric, engineers can create shortcuts and build transformations directly on the source.

Common Scenarios

  • A finance team wants to build Power BI reports on data stored by the operations team without moving the data.
  • A data scientist needs access to parquet files in Amazon S3 but prefers to analyze them within Fabric.
  • A company with multiple Fabric workspaces wants to centralize access to shared reference data (like customer or product master data) without replication.

In summary: Microsoft Fabric Shortcuts simplify data access across locations and workspaces. Whether table-based or file-based, they allow organizations to unify data without duplication, streamline analytics, and improve collaboration.

Here is a link to the Microsoft Learn OneLake documentation about Shortcuts. From there you will be able to explore all the Shortcut topics shown in the image below:

Thanks for reading! I hope you found this information useful.