SC-500 Server and VM Security: Disk Encryption, Bastion, JIT, Arc and Defender for Servers
Server and VM security on SC-500 means protecting Azure, on-premises and multicloud machines at every layer: encrypting their disks with the right option and key, removing public management exposure with Azure Bastion and just-in-time (JIT) access, bringing non-Azure servers under Azure control with Azure Arc, detecting threats and vulnerabilities with Microsoft Defender for Servers, hardening the boot chain with Trusted launch, and enforcing in-guest settings with Azure Machine Configuration. This lesson covers each of those skills and the near-identical choices between them: SSE vs encryption at host vs Azure Disk Encryption, Bastion SKUs, JIT request vs configure permissions, Arc onboarding and local agent controls, Plan 1 vs Plan 2, agentless scanning and machine configuration modes. NSG and Azure Firewall design is taught in the network lesson, connecting AWS and GCP environments in the posture lesson, and AI and container workloads in their own lessons.
On this page10 sections
- Disk encryption: choosing an option, customer-managed keys, rotation and revocation
- Azure Bastion: choosing a SKU and the NSG rules it needs
- Just-in-time VM access: how it works and how to enable it
- JIT permissions, enforcement and auditing
- Extending security controls to hybrid and multicloud servers with Azure Arc
- Onboarding servers to Defender for Servers, including hybrid and multicloud
- Configuring Defender for Servers: EDR and vulnerability assessment
- Agentless scanning for VMs
- VM security types: Trusted launch, Secure Boot, vTPM and boot integrity monitoring
- Enforcing server configuration with Azure Machine Configuration
- Choose between server-side encryption, encryption at host, Azure Disk Encryption and confidential disk encryption, and configure customer-managed keys with a disk encryption set
- Pick the Azure Bastion SKU that meets a requirement and configure the NSG rules Bastion and its target subnets need
- Enable, enforce and audit just-in-time VM access, and grant least-privilege permissions to request or configure it
- Onboard hybrid and multicloud servers with Azure Arc and lock down the Connected Machine agent locally
- Onboard servers to Defender for Servers, choose between Plan 1 and Plan 2, and configure EDR, vulnerability assessment and agentless scanning
- Configure Trusted launch features (Secure Boot, vTPM, boot integrity monitoring) and enforce in-guest settings with Azure Machine Configuration
Disk encryption: choosing an option, customer-managed keys, rotation and revocation
Every Azure managed disk is already encrypted at rest by server-side encryption (SSE); the decision is what else has to be encrypted and who holds the key. SSE covers persisted OS and data disks, snapshots and images, but it never encrypts the temporary disk or the OS and data disk caches. Encryption at host closes that gap: the VM host encrypts temp disks, caches and the data flowing to storage, so no guest CPU is spent and nothing runs inside the VM. It is Microsoft's recommended option for new VMs.
Azure Disk Encryption (ADE) runs BitLocker (Windows) or DM-Crypt (Linux) inside the guest, with keys and optional key encryption keys (KEKs) in Key Vault. It uses the VM's own CPU and is scheduled for retirement on 15 September 2028, so it is a migration source, not a design choice for new workloads. Confidential disk encryption is for confidential VMs: the OS disk keys are bound to the VM's vTPM, which is only meaningful together with the hardware-based protection of data in use that confidential computing provides.
| Option | What it encrypts | Where it runs | Use it when |
|---|---|---|---|
| SSE with platform-managed keys (default) | Persisted OS and data disks, snapshots, images | Storage service | Baseline; always on |
| SSE with customer-managed keys (disk encryption set) | Same as SSE, with your key in Key Vault or Managed HSM | Storage service | You must control or revoke the key |
| Double encryption at rest | Same as SSE, with a second infrastructure-layer encryption | Storage service | Two independent at-rest layers are required |
| Encryption at host | Temp disk, OS and data disk caches, data flow to storage (plus everything SSE covers) | VM host, no guest CPU | Temp disks and caches must be encrypted; recommended for new VMs |
| Azure Disk Encryption | Volumes inside the guest OS | Guest OS (BitLocker / DM-Crypt) | Existing VMs only; retiring 15 September 2028 |
| Confidential disk encryption | OS disk of a confidential VM, keys bound to its vTPM | Confidential VM | Data in use must be protected from the operator and host |
Double encryption and customer-managed keys still protect only persisted disks; neither adds temp-disk or cache coverage, and neither protects memory. When the requirement says data in use must be shielded from the cloud operator and host, only a confidential VM meets it; Trusted launch and encryption at host protect boot integrity and data at rest respectively.
Moving from ADE to encryption at host
There is no in-place migration. Encryption at host can't be enabled on a VM whose disks have ever used ADE, because the disks keep ADE metadata (the UDE flag) even after full decryption, and snapshots or the disk Copy option carry that flag with them. Microsoft's supported path is: disable ADE and confirm the volumes are fully decrypted, create new empty managed disks with the Upload method, copy each disk's data into them (for example with AzCopy), then create a new VM with encryption at host and attach the new disks. A Linux VM whose OS disk is ADE-encrypted can't decrypt that disk at all, so it needs a fresh VM and a data copy.
Customer-managed keys through a disk encryption set
A disk encryption set (DES) is the Azure resource that links managed disks to a customer-managed key in Key Vault or Managed HSM. Disks use envelope encryption: each disk has a data encryption key, and the storage service wraps and unwraps it with your key by calling Key Vault as the DES's managed identity (system-assigned by default). That identity, not the VM and not the administrator, is what needs key access.
- Key Vault using Azure RBAC: assign Key Vault Crypto Service Encryption User to the DES identity. It grants only get, wrap and unwrap on keys, which is least privilege. Key Vault Crypto User would also work but adds encrypt, decrypt, sign and verify; Key Vault Crypto Officer is a key-management role.
- Key Vault using access policies: grant the DES identity the Get, Wrap Key and Unwrap Key key permissions. Access policies are ignored once a vault uses the RBAC permission model.
- The key vault needs soft delete and purge protection, so a key can't be destroyed by accident.
Rotation
A DES that references a specific key version stays on that version. A Key Vault rotation policy creates new key versions, but on its own it changes nothing on the disks. Turn on automatic key rotation on the disk encryption set, and Azure moves every disk, snapshot and image that references the DES to the latest key version within about an hour, without rebooting VMs. Any approach that tracks new key versions yourself, by hand or with custom automation, can work, but it is repeated work or code to maintain; the DES setting is the built-in way to keep disks on the latest version.
Revocation is a shutdown
If the key is disabled, deleted or expires, the storage service can no longer unwrap the disks' data keys. VMs whose OS or data disks use that key are shut down automatically and won't start until the key is re-enabled or a new key is assigned. The effect is immediate and total: the disks stay encrypted with the unavailable key, so the only recovery is restoring access to that key or assigning another one. This is the point of customer-managed keys, and also why key vault permissions need the same care as the VMs themselves.
Azure Bastion: choosing a SKU and the NSG rules it needs
Azure Bastion is a managed service that gives RDP and SSH to VMs over TLS through the Azure portal or a native client, so the VMs need no public IP address and no management ports open to the internet. Bastion connects to each target on its private IP. The SKU decides which features are available, and you can upgrade a SKU but not downgrade it.
| SKU | Deployment | Key capabilities | Limits |
|---|---|---|---|
| Developer | Free, shared pool; no AzureBastionSubnet, no public IP | Browser-based RDP/SSH from the portal | One VM connection at a time, same virtual network only (no peering), dev/test only, selected regions |
| Basic | Dedicated host in AzureBastionSubnet, billed hourly | Browser-based RDP/SSH; VMs in peered virtual networks | No native client, no file transfer, no host scaling |
| Standard | Dedicated, as Basic | Adds native client (az network bastion rdp / ssh), file upload and download, host scaling, IP-based connection, shareable links, custom ports | No session recording, needs a public IP |
| Premium | Dedicated, as Standard | Adds session recording (to a blob container through a SAS URL) and private-only deployment (no public IP; reached over private connectivity such as ExpressRoute private peering or VPN) | Highest cost |
Pick the lowest SKU that covers every stated requirement: native client or file transfer means Standard at least; session recording or a bastion host with no public IP means Premium. Diagnostic logs on any dedicated SKU record who connected and when, but they are not a playable recording. IP-based connection is about how Bastion reaches targets by private IP (including on-premises addresses), not about how users reach Bastion.
NSG rules
Bastion is deployed into a subnet named exactly AzureBastionSubnet (/26 or larger). If you attach an NSG to it, it must carry every rule below, or Bastion stops working, reports as unhealthy or misses platform updates.
| Direction | Source / destination | Port | Purpose |
|---|---|---|---|
| Inbound | From Internet (or your user ranges) | 443 | User sessions |
| Inbound | From GatewayManager | 443 | Control plane: management and updates |
| Inbound | From AzureLoadBalancer | 443 | Health probes |
| Inbound | VirtualNetwork to VirtualNetwork | 8080, 5701 | Bastion data-plane communication |
| Outbound | To VirtualNetwork | 3389, 22 (and any custom ports) | Sessions to target VMs |
| Outbound | VirtualNetwork to VirtualNetwork | 8080, 5701 | Data-plane communication |
| Outbound | To AzureCloud | 443 | Diagnostics and metering |
| Outbound | To Internet | 80 | Session and certificate validation |
The target VMs' subnet needs only an inbound allow for 3389 (Windows) or 22 (Linux) from the AzureBastionSubnet address range. Scoping the source that narrowly lets Bastion in and keeps everything else out; RDP and SSH ports are never needed inbound on AzureBastionSubnet itself.
Just-in-time VM access: how it works and how to enable it
Just-in-time (JIT) VM access is a Defender for Cloud feature that keeps management ports such as RDP and SSH closed by default and opens them only when an authorised user requests access, for a limited time and from a specified source IP. It is part of Defender for Servers Plan 2; Plan 1 and Defender CSPM don't include it.
When you enable JIT on a VM, Defender for Cloud adds deny rules for the selected ports to the VM's NSG (and, if the VM sits behind one, to an Azure Firewall). Defender for Cloud proposes ports 22, 3389, 5985 and 5986; the defaults are a three-hour maximum request time and any source IP (enabling JIT from the VM's own Configuration page covers just 3389 on Windows or 22 on Linux). You can change the ports, the time limit and the allowed source IPs. JIT also extends, in preview, to AWS EC2 instances connected to Defender for Cloud. An approved request adds a time-limited allow rule with higher priority than the deny rule, for the requester's IP (or the range you allowed), and removes it when the time expires.
- Existing rules win. JIT doesn't rewrite rules that were already there. A standing allow rule for a JIT port keeps priority over the deny rule JIT adds, so the port stays open without any request. To make every connection go through JIT, remove the old allow rule; a new deny rule at a lower priority is evaluated after it and changes nothing.
- Azure Firewall: JIT can manage an Azure Firewall only when it uses classic rules. A firewall governed by Azure Firewall Manager through a firewall policy isn't supported, at any tier, so a VM protected only that way shows as unsupported. JIT on a firewall uses DNAT rules, so the VM doesn't need its own public IP.
- A VM with no NSG and no supported firewall in front of it can't use JIT until one of those is in place.
JIT controls when a port is open; it is not a connection path. Users still need network reachability, and pairing JIT with Bastion (no public exposure at all) is a common design.
JIT permissions, enforcement and auditing
Least privilege separates requesting JIT access from configuring it. Microsoft documents the actions each job needs, so a custom role can grant exactly one of them.
| Job | Actions |
|---|---|
| Request JIT access | Microsoft.Security/locations/jitNetworkAccessPolicies/initiate/action plus reads of the JIT policies (…/jitNetworkAccessPolicies/read), the VM (Microsoft.Compute/virtualMachines/read), its network interfaces and public IP addresses |
| Configure or edit JIT policies | Microsoft.Security/locations/jitNetworkAccessPolicies/write and Microsoft.Compute/virtualMachines/write |
| View JIT policies only | Microsoft.Security/locations/jitNetworkAccessPolicies/read and related reads |
Requesters don't need NSG permissions, because Defender for Cloud edits the NSG or firewall on their behalf. Microsoft.Compute/virtualMachines/login/action is unrelated: it governs Microsoft Entra ID sign-in to a VM, not JIT, and isn't needed when people sign in with local accounts.
Finding VMs that should use JIT
Defender for Cloud lists every VM that supports JIT but doesn't have it as an unhealthy resource of the recommendation Management ports of virtual machines should be protected with just-in-time network access control, across all subscriptions in scope. Selecting unhealthy VMs there lets you enable JIT directly. Other recommendations remediate differently: Management ports should be closed on your virtual machines wants the ports closed, and Internet-facing virtual machines should be protected with network security groups flags VMs with no NSG at all. On the Just-in-time VM access page, the Configured tab shows VMs already protected, Not configured shows candidates, and Unsupported shows VMs JIT can't manage, with the reason.
Auditing
Each JIT request is an Azure operation, so it is recorded in the Activity log. From the Configured tab, the VM's menu opens the Activity log already filtered to that VM, showing who requested access and when, and the view can be downloaded as CSV. Approved requests are normal operations and don't raise security alerts; NSG flow logs show packets, not who requested access.
Extending security controls to hybrid and multicloud servers with Azure Arc
Azure Arc-enabled servers project on-premises and other-cloud machines into Azure as resources, so Azure Policy, machine configuration, Defender for Cloud and VM extensions can target them like Azure VMs. Onboarding installs the Azure Connected Machine agent on each server; the agent already includes the machine configuration (guest configuration) agent.
Onboarding at scale with least privilege
For scripted onboarding of many servers, create a service principal and assign it Azure Connected Machine Onboarding, scoped to the target resource group. That role can only connect new machines, so a secret stored on a deployment server can't be used to change existing machines or deploy extensions. Azure Connected Machine Resource Administrator (and the older Hybrid Server Resource Administrator) also manage existing machines and extensions, and Kubernetes Cluster - Azure Arc Onboarding is for clusters, not servers. An Azure Arc private link scope keeps agent traffic on private endpoints; it controls connectivity, not what runs on the server.
Local agent security controls
Some protections must hold even against an Azure subscription Owner, so they live in the agent and can only be changed by running azcmagent config locally on the server:
- Extension allowlist / blocklist (
extensions.allowlist,extensions.blocklist): only allowed extensions can be installed, or listed ones are refused, whatever is requested from Azure. - Monitor mode (
azcmagent config set config.mode monitor): a preset that allows only monitoring and security extensions (such as Azure Monitor Agent and Defender for Cloud's), blocks extensions that run scripts or change configuration (Custom Script, Run Command), disables the machine configuration agent, and freezes the allowlist and blocklist. It suits servers such as domain controllers that are onboarded only for monitoring and protection. - Guest configuration switch (
guestconfiguration.enabled): turns the machine configuration agent off or on.
Azure Policy deny assignments and RBAC changes can be undone by an Owner, so they can't meet a "block even Owners" requirement. If a monitor-mode server must also report machine configuration baselines, switch it back to full mode, set an extensions allowlist that still excludes script extensions, and set guestconfiguration.enabled to true. Custom machine configuration content runs with high privilege, so enable it only where the compliance need justifies it.
Onboarding servers to Defender for Servers, including hybrid and multicloud
Microsoft Defender for Servers is the Defender for Cloud plan that protects Windows and Linux machines in Azure, on-premises and in AWS or Google Cloud. How a machine gets onboarded depends on where it runs and on which features it needs.
| Machine | Onboarding path | What you get |
|---|---|---|
| Azure VM | Enable the plan on the subscription (or Plan 1 per VM) | All features of the plan |
| On-premises or other server, needs Azure Policy / machine configuration / full Plan 2 | Azure Arc (Connected Machine agent), then the subscription's plan applies | All features of the plan |
| Server already running the Defender for Endpoint sensor, no new agent allowed | Direct onboarding: a tenant-level setting in Environment settings that shows those servers in Defender for Cloud under a subscription you designate | Plan 1 features (plus Defender Vulnerability Management features with Plan 2); no Azure Policy or machine configuration, no Arc-dependent features |
| AWS EC2 / GCP Compute Engine | Multicloud connector with Defender for Servers on, ideally with Azure Arc auto-provisioning | Agentless features through the connector; Arc-dependent features (file integrity monitoring, OS baseline misconfigurations) once Arc is deployed |
For AWS and GCP machines, agentless scanning works through the connector with no agent, which is why its results can appear before anything else. Features that run in the guest need the machine to be Arc-onboarded; letting the connector auto-provision Arc covers existing and future instances, where a manual Arc rollout has to be repeated. Creating the connectors themselves belongs to the multicloud posture topic.
Plan 1 vs Plan 2 and where to enable them
| Capability | Plan 1 | Plan 2 |
|---|---|---|
| Defender for Endpoint integration (EDR, next-generation protection) | Yes | Yes |
| Agent-based vulnerability assessment (Defender Vulnerability Management) and software inventory | Yes | Yes |
| Defender Vulnerability Management premium features (security baselines, browser extension and certificate inventory, in the Defender portal) | No | Yes |
| Agentless machine scanning (vulnerabilities, software, secrets) and agentless malware scanning | No | Yes |
| Just-in-time VM access | No | Yes |
| File integrity monitoring and OS configuration (baseline) assessment | No | Yes |
Scope matters for cost. Plan 1 can be enabled and disabled per resource, so a handful of VMs can be covered without paying for the whole subscription. Plan 2 is enabled only at subscription level; it can be disabled on individual resources afterwards. Enabling either plan on the subscription bills every machine in it; tags don't limit coverage.
Configuring Defender for Servers: EDR and vulnerability assessment
Defender for Servers settings live in Defender for Cloud under Environment settings > the subscription > Defender plans > Servers > Settings, where each component (endpoint protection, vulnerability assessment, agentless scanning and others) is switched on or off.
Endpoint detection and response (Defender for Endpoint)
The Endpoint protection component deploys Microsoft Defender for Endpoint to Azure VMs and Arc-enabled machines (the MDE.Windows and MDE.Linux extensions), giving EDR, next-generation protection and alerts that flow into Defender for Cloud. It is on by default when the plan is enabled. Points that come up when configuring it:
- Unified solution for older Windows Server: subscriptions that turned on the integration before the unified Defender for Endpoint solution existed need a one-time opt-in. The component then shows Partial; selecting Fix and enabling the Unified solution makes Defender for Cloud deploy it to Windows Server 2016 and 2012 R2 machines.
- Linux update control: MDE.Linux keeps the Defender for Endpoint package up to date. Tag specific Azure VMs or Arc machines with
ExcludeMdeAutoUpdate=trueto manage their package versions manually; every other machine keeps automatic updates. - Tenant association: machines are onboarded to the Defender for Endpoint tenant associated with the subscription's Microsoft Entra tenant. A machine that already reports to a different Defender for Endpoint tenant must be offboarded there first.
- Defender for Servers no longer uses the retired Log Analytics agent (MMA) for any of this.
Turning off the component, or disabling the plan on a VM, removes protection rather than adjusting it, so scoped behaviour changes are made with tags or per-machine settings.
Vulnerability assessment
The built-in vulnerability scanner is Microsoft Defender Vulnerability Management (MDVM). With the plan enabled, MDVM assessment is on by default for machines that run the Defender for Endpoint sensor, so software inventory and CVE-based findings appear in Plan 1 without anyone deploying a scanner. The older Qualys-based integrated scanner has been retired. Agentless scanning (Plan 2 or Defender CSPM) also feeds MDVM, from disk snapshots instead of the sensor. MDVM premium capabilities such as security baseline assessments, browser extension inventory and digital certificate inventory are included in Plan 2 and are viewed in the Microsoft Defender portal; no separate MDVM add-on licence is needed. Azure Update Manager reports missing patches, which is a different thing from a CVE-based inventory. Deeper configuration of vulnerability management findings belongs to the posture topic.
Agentless scanning for VMs
Agentless machine scanning takes snapshots of a VM's disks, analyses them out of band in Microsoft's scanning environment and deletes them, so nothing is installed or run on the machine and there is no performance impact on it. It reports software inventory, vulnerabilities (through Defender Vulnerability Management) and secrets, and with Defender for Servers Plan 2, malware found with Microsoft Defender Antivirus engines.
| Plan | Agentless vulnerabilities, software, secrets | Agentless malware scanning |
|---|---|---|
| Defender for Servers Plan 1 | No | No |
| Defender CSPM | Yes | No |
| Defender for Servers Plan 2 | Yes | Yes |
This makes agentless scanning the answer for appliances or machines whose support terms forbid an agent: Plan 2 gives malware detection with nothing installed. If agentless vulnerability results already appear on a Plan 1 subscription, they come from Defender CSPM, which never adds malware detection.
Managing it
- Enable it in the plan's settings (the Agentless scanning for machines component); you can exclude machines by tag.
- Schedule: scans run on a fixed daily (24-hour) cycle that you can't change. Only machines that are running during the scan are scanned, so a VM that is always deallocated then never reports.
- Unsupported disks: a VM with any Ultra Disk or Premium SSD v2 disk attached is skipped entirely, and VMs with more than 14 disks aren't supported. If a VM's disks total more than 4 TB, only the OS disk is scanned, and file systems such as ReFS, UFS, ZFS and RAID formats aren't scanned.
- Customer-managed keys: platform-managed-key disks need nothing extra. To copy CMK-encrypted disks, the Defender for Cloud Servers Scanner Resource Provider application needs get, wrap and unwrap on the key: on an RBAC vault assign it Key Vault Crypto Service Encryption User; on an access-policy vault give it those key permissions. The built-in VM Scanner Operator role covers reading disks and creating snapshots, not key access.
When most VMs report and a few don't, the plan and setting are fine; look at the machines (disk types, power state, CMK access) rather than the subscription.
VM security types: Trusted launch, Secure Boot, vTPM and boot integrity monitoring
A VM's security type sets its boot-level protection: Standard (no Secure Boot or vTPM), Trusted launch, or Confidential virtual machine. Trusted launch is the default for new Generation 2 VMs and needs a Gen2 image and a supported size, with no extra cost.
| Feature | What it does |
|---|---|
| Secure Boot | Only signed boot loaders, kernels and drivers can load, which blocks bootkits and rootkits |
| vTPM | A virtual TPM 2.0 that holds keys and boot measurements, so secrets can be sealed to the VM (for example BitLocker keys) |
| Boot integrity monitoring | The Guest Attestation extension verifies the measured boot chain remotely and reports to Defender for Cloud, which raises recommendations and alerts when attestation fails |
Secure Boot and vTPM are independent settings. If a workload needs an unsigned driver or kernel module, clear Enable Secure Boot only; the vTPM stays and keeps protecting keys. Attestation then fails by design whenever Secure Boot is off, raising a recurring alert, and Microsoft's guidance is to suppress that alert for the VM. Switching to the Standard type would remove the vTPM too.
Confidential VMs (for example DCasv5 or ECasv5 sizes) add hardware-based isolation of memory and state from the host and the cloud operator, plus a vTPM and optional confidential OS disk encryption. Choose them only when data in use must be protected; Trusted launch protects boot integrity on ordinary Gen2 sizes.
Upgrading an existing Generation 1 VM to Trusted launch
- The OS and size must support Trusted launch, and the OS disk must be converted to GPT first (for Windows, with MBR2GPT).
- If Azure Backup protects the VM with the Standard policy, move it to the Enhanced policy; Trusted launch can't be enabled under Standard.
- Turn off BitLocker (or other OS-volume encryption) inside Windows before the upgrade and re-enable it afterwards.
- Changing the security type to Trusted launch performs the Gen1-to-Gen2 change in one step; a Gen2 upgrade without Trusted launch isn't supported.
Enforcing server configuration with Azure Machine Configuration
Azure Machine Configuration (formerly guest configuration) is the Azure Policy capability that audits and applies settings inside the operating system of Azure VMs and Arc-enabled servers, such as security baselines, registry values or installed software. Policy assignments deliver the configuration; an agent in the machine evaluates it and reports compliance.
| Machine | Prerequisites |
|---|---|
| Azure VM | The machine configuration extension plus a system-assigned managed identity, which the machine uses to read assignments and report results. The built-in prerequisites initiative deploys both (and adds a system-assigned identity even when a user-assigned one exists). |
| Arc-enabled server | Nothing extra: the Connected Machine agent includes the machine configuration agent, unless it was disabled locally (monitor mode or guestconfiguration.enabled false). |
Assignments that stay not started with no guest assignment results usually mean those prerequisites are missing. Azure Monitor Agent is unrelated: it collects logs, it doesn't evaluate configuration.
Assignment modes
| Mode | Behaviour |
|---|---|
| Audit | Reports compliance only; never changes the machine |
| ApplyAndMonitor | Applies the configuration once, then only reports drift |
| ApplyAndAutoCorrect | Applies the configuration and brings the machine back into conformance whenever it drifts |
For a custom package, the mode is chosen when you generate the policy definition with New-GuestConfigurationPolicy -Mode. Apply modes produce a DeployIfNotExists definition: new or updated machines get the guest assignment automatically, but machines that already exist are brought in only by a remediation task. A Deny effect evaluates Azure Resource Manager requests, so it can't block a setting changed inside the guest; drift inside the OS is corrected by ApplyAndAutoCorrect.
Tip. Expect Microsoft-style scenarios: a set of VMs or servers, a requirement and a deciding constraint such as least privilege, lowest cost, least administrative effort, no VM restarts, no public IP, no additional agents, or a control that must stop even subscription Owners. Items ask which encryption option, Bastion SKU, role, plan, setting or mode fits, which two actions together complete a task (multi-response), or why something silently isn't working (a port still open after JIT, VMs missing from agentless results, a Bastion host marked unhealthy, machine configuration assignments that never start, a partial endpoint protection status). Near-twins to keep apart: SSE vs encryption at host vs ADE vs confidential disk encryption, Key Vault Crypto Service Encryption User vs Crypto User, Bastion Basic vs Standard vs Premium, JIT initiate vs write permissions, direct onboarding vs Azure Arc, Plan 1 vs Plan 2 vs Defender CSPM, Arc monitor mode vs an Azure Policy deny, and ApplyAndMonitor vs ApplyAndAutoCorrect. NSG and firewall design, connecting AWS and GCP environments, and AI and container workloads are tested in their own topics.
- SSE never encrypts temp disks or caches; encryption at host does, on the host with no guest CPU. Azure Disk Encryption retires on 15 September 2028, and moving off it means new upload disks and a new VM, not snapshots.
- A disk encryption set reaches Key Vault as its managed identity: Key Vault Crypto Service Encryption User on RBAC vaults; turn on DES automatic key rotation; disabling the key shuts the VMs down.
- Bastion: Developer is free and single-VM; native client and file transfer start at Standard; session recording and private-only deployment need Premium.
- AzureBastionSubnet inbound needs 443 from Internet, GatewayManager and AzureLoadBalancer plus 8080/5701 within the VNet; target subnets allow 3389/22 from the Bastion subnet only.
- JIT needs Defender for Servers Plan 2, works with NSGs and classic-rule Azure Firewalls, and can't override existing allow rules for its ports.
- Requesting JIT is initiate/action plus reads; configuring it is policy write plus VM write. Audit JIT in the Activity log; find candidates through the just-in-time recommendation.
- Arc onboarding at scale uses a service principal with Azure Connected Machine Onboarding; only local azcmagent settings (allowlist, blocklist, monitor mode) stop even Azure Owners.
- Plan 1 (per resource possible) covers Defender for Endpoint EDR and MDVM; Plan 2 (subscription level) adds JIT, FIM, OS baselines, agentless malware scanning and MDVM premium.
- Agentless scanning needs Plan 2 or Defender CSPM (malware is Plan 2 only), runs daily on running VMs, skips Ultra and Premium SSD v2 disks, and needs key access for CMK disks.
- Trusted launch gives Secure Boot, vTPM and boot integrity monitoring; machine configuration needs the extension plus a system-assigned identity on Azure VMs, and ApplyAndAutoCorrect plus a remediation task to fix existing machines and drift.
Frequently asked questions
What is the difference between server-side encryption and encryption at host for Azure VMs?
Server-side encryption (SSE) encrypts managed OS and data disks, snapshots and images at rest in the storage service, with platform-managed or customer-managed keys, but it doesn't encrypt the VM's temporary disk or its disk caches. Encryption at host encrypts the temp disk, the OS and data disk caches and the data flowing to storage on the VM host itself, without using the VM's CPU, and it is Microsoft's recommended option for new VMs. Azure Disk Encryption, the older in-guest option, is scheduled for retirement on 15 September 2028.
Which Azure Bastion SKU supports session recording?
Only the Azure Bastion Premium SKU records RDP and SSH sessions, storing them in a blob container in your storage account. Premium is also the only SKU that supports a private-only deployment with no public IP address. Standard adds native client connections, file transfer, host scaling and shareable links but can't record sessions, and diagnostic logs on any SKU capture connection events rather than playable recordings.
Which Defender for Servers plan includes just-in-time VM access?
Just-in-time VM access is included only in Microsoft Defender for Servers Plan 2. Plan 1, which centres on Defender for Endpoint EDR and agent-based vulnerability assessment, doesn't include it, and neither does Defender CSPM. JIT keeps management ports closed with deny rules in the VM's NSG or classic-rule Azure Firewall and opens them for a limited time when an authorised user requests access.
Why is RDP still open after enabling JIT on a VM?
Just-in-time access doesn't override rules that already existed for the protected port. If the VM's NSG had an allow rule for 3389 before JIT was enabled, that rule keeps priority over the deny rule JIT adds, so the port stays open without any request. Remove the standing allow rule so the JIT deny rule takes effect and only approved, time-limited requests open the port.
What is the difference between Defender for Servers Plan 1 and Plan 2?
Defender for Servers Plan 1 provides Microsoft Defender for Endpoint integration (EDR and next-generation protection), agent-based vulnerability assessment with Defender Vulnerability Management and software inventory, and it can be enabled per resource. Plan 2 adds just-in-time VM access, file integrity monitoring, OS configuration baseline assessment, agentless scanning including agentless malware scanning, and Defender Vulnerability Management premium features; it is enabled at subscription level and can be disabled on individual resources.
How do you onboard on-premises and AWS servers to Defender for Servers?
On-premises servers are usually onboarded with Azure Arc by installing the Azure Connected Machine agent, which makes them Azure resources and gives them every feature of the subscription's Defender for Servers plan. Servers already running the Defender for Endpoint sensor can instead use direct onboarding, which adds no agent but gives Plan 1 features and no Azure Policy support. AWS EC2 and Google Cloud machines are covered through a multicloud connector, where Azure Arc auto-provisioning unlocks features such as file integrity monitoring and OS baseline assessment.
What does agentless scanning in Defender for Servers need to scan disks encrypted with customer-managed keys?
Agentless scanning copies VM disks from snapshots, so for disks encrypted with customer-managed keys the Defender for Cloud Servers Scanner Resource Provider application needs get, wrap and unwrap on the key. In a Key Vault that uses Azure RBAC, assign it the Key Vault Crypto Service Encryption User role; in a vault that uses access policies, grant those key permissions in a policy. Disks with platform-managed keys need no extra permissions.
What are the prerequisites for Azure Machine Configuration on Azure VMs?
Azure Machine Configuration needs the machine configuration extension and a system-assigned managed identity on each Azure VM; the built-in prerequisites initiative deploys both. Arc-enabled servers need nothing extra because the Connected Machine agent includes the machine configuration agent, unless it has been disabled locally, for example by monitor mode. Without the prerequisites, assignments stay in a not-started state and report no results.
Source
This lesson covers the "Secure compute" domain of the official SC-500 exam guide. Vendors revise their guides — check the source for the current version.
- Microsoft SC-500 study guide — Microsoft Learn
Sign up free to mark lessons complete, bookmark topics and track your exam readiness.