Add policies: Deploy the Microsoft Entra login extensions to Azure VMs#541
Open
simon-vedder wants to merge 1 commit into
Open
Add policies: Deploy the Microsoft Entra login extensions to Azure VMs#541simon-vedder wants to merge 1 commit into
simon-vedder wants to merge 1 commit into
Conversation
Author
|
@microsoft-github-policy-service agree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
Two
DeployIfNotExistspolicies that install the Microsoft Entra login extensions, so users can sign in to Azure virtual machines with their Microsoft Entra credentials — over SSH on Linux, over RDP on Windows — with access governed by Azure RBAC and Conditional Access, and no SSH keys or local accounts to manage.policyDefinitions/Compute/configure-windows-virtual-machines-to-use-microsoft-entra-loginAADLoginForWindowsDeployIfNotExistspolicyDefinitions/Compute/configure-linux-virtual-machines-to-use-microsoft-entra-loginAADSSHLoginForLinuxDeployIfNotExistsThere are built-in policies that harden an Entra-enabled machine (
357cbd2d-…andcd22fc48-…, disable local users), but none that deploy the extensions that enable Entra login in the first place — the same gap the repo already fills for Log Analytics, Qualys, IaaSAntimalware and other extensions.Design notes
DSREG_E_MSI_TENANTID_UNAVAILABLEon Windows). As with any extension-deploy policy, the prerequisite is left to the assignment: pair these with a policy that provides the identity — for example Microsoft's built-ins3cf2ab00-13f1-4d0c-8971-2ac904541a7eand497dff13-db2a-4c0f-8603-28fa3b331ab6— assigned and remediated first.matchAllWindowsImages/matchAllLinuxImagesfor custom and golden images. Windows Server Core is excluded (no Desktop Experience). Rocky and AlmaLinux each ship under two marketplace publisher names; both are in the defaultsupportedImagePublishers.evaluationDelay: AfterProvisioningSuccessso newly created virtual machines are picked up without a manual compliance scan.Testing
Validated in a live subscription against a lab covering the match and no-match cases. The extensions were assigned alongside the two built-in identity policies above — the same way you would combine them in practice.
AzureAdJoined : YESAzureAdJoined : YESAADSSHLoginForLinuxinstalledBoth interactive sign-in paths were confirmed end-to-end on a policy-configured VM:
az ssh vmlands on a shell as the Microsoft Entra user, no SSH key placed on the machine.enablerdsaadauth+targetisaadjoined) reaches the desktop as the Microsoft Entra user, including an MFA prompt satisfied through the browser flow.A note on the compliance signal
Like any
DeployIfNotExistspolicy, the Windows policy reports a virtual machine compliant once the extension reportsprovisioningState: Succeeded.AADLoginForWindowscan reportSucceededwhile the Entra join itself failed (for exampleerror_hostname_duplicatefrom a leftover device object) — a property of the extension, identical under a manual install, not something a policy can detect. Where the join state matters, verify out of band withdsregcmd /status. The Linux extension does not create a device object and surfaces failures as a failed provisioning state. Flagging it for transparency.References