Choosing an Azure Identity for Azure Arc Onboarding of an On-Premises Server
Short answer
B Use Service2 only, the least-privileged service principal with the Azure Connected Machine Onboarding role at RG2, to onboard Host2 to Azure Arc with automatic machine authentication.
Question
Company Information
Litware, Inc. is a retail company that has a main office in San Francisco and branch offices across North America.
Litware manages an on-premises Windows Server environment arid integrates selected servers with Azure services.
Litware has an Azure subscription linked to a Microsoft Entra hybrid tenant.
Existing Environment
Active Directory Infrastructure
The network contains only two on-premises Active Directory Domain Services (AD DS) forests named litware.com and nwtraders.com as shown in the following exhibit.

Active Directory member servers
The forests contain member servers and 1,000 Windows devices.
The domains contain the servers shown in the following table.

BitLocker Drive Encryption (BitLocker) is enabled for all the servers. BitLocker recovery information is stored in AD DS.
The servers have the connection security rules shown in the following table.

Active Directory domain controllers
The domains contain the domain controllers shown in the following table.

Active Directory identities
The litware.com forest contains the users shown in the following table.

User2 has attached a removable disk named Disk1 to Host1 and has enabled BitLocker.
The forests contain the groups shown in the following table.

Virtualization configuration
HV1 has the virtual switches shown in the following table.

HV1 has five physical network adapters. Two adapters are bound to VSwitch4.
HV1 contains virtual machines that run Windows Server and have the DHCP Server role installed. The virtual machines are configured as shown in the following table.

DNS configuration
The litware.com domain hosts the Active Directory-integrated DNS zones shown in the following table.

Azure subscription
The Azure subscription contains two resource groups named RG1 and RG2.
The Microsoft Entra tenant contains the identities shown in the following table.

All the identities have the Azure Connected Machine Onboarding role at scope RG2.
Requirements
Planned changes
Litware plans to implement the following changes:
• Deploy a virtual machine named VM5 that runs Windows Server, is connected to VSwitch3, and obtains an IPv4 address automatically.
• Create a DNS resource record named Record1 in zone1.litware.com and a DNS resource record named Record2 in zone2.litware.com.
• On Host1, add User2 to the local OpenSSH Users group and User3 to the local Administrators group.
• Deploy a domain controller named DC9 to the litware.com domain.
• Create a user named User5 in the litware.com domain.
• Onboard Host2 to Azure Arc as a resource in RG2.
• Move Disk1 from Host1 to Host2.
Technical requirements
Litware identifies the following technical requirements:
• The Azure Arc onboarding of Host2 must use automatic machine authentication for Azure sign-ins.
• The deployment of DC9 must minimize initial AD DS replication traffic across the network.
• HV1 must have the maximum possible number of external virtual switches.
• All solutions must follow the principle of least privilege.
• All solutions must minimize administrative effort.
• All solutions must minimize costs.
You need to implement the planned change for Host2. The solution must meet the technical requirements.
Which Azure identities should you use?
Key Takeaways
The question tests the boundary between service principals and managed identities for non-interactive Arc onboarding, then applies least privilege to pick the minimally-permissioned service principal.
Onboarding an on-premises server like Host2 to Azure Arc with automatic machine authentication requires a service principal, not a managed identity. Applying least privilege selects Service2, which holds only the Azure Connected Machine Onboarding role at RG2.
Common mistake: Choosing D (Service1 or Service2) is the most plausible wrong answer because both service principals can technically onboard the machine, but it ignores the least-privilege requirement that excludes the over-permissioned Service1.
Expert Analysis
Service principal vs managed identity for Arc onboarding The decisive technical requirement is that Host2 onboarding must use automatic machine authentication for Azure sign-ins, meaning the onboarding must be non-interactive. On-premises servers like Host2 do not possess an Azure-managed identity, so Managed1 and Managed2 cannot be used directly by the azcmagent running on Host2. Managed identities are only available on Azure-hosted resources; an on-premises Windows Server has no mechanism to obtain a managed-identity token. This eliminates options C and E.
Service principal is the required identity type For non-interactive onboarding of an on-premises server, Azure Arc requires a service principal (with a secret or certificate) so the agent can authenticate without a human signing in interactively. Both Service1 and Service2 are service principals and both hold the Azure Connected Machine Onboarding role at RG2, so either could technically perform the onboarding. This is why option D looks tempting.
Least privilege narrows to Service2 The technical requirements explicitly mandate the principle of least privilege. Community feedback notes that Service1 carries more permissions than necessary, while Service2 has exactly the permissions needed. Because the Azure Connected Machine Onboarding role at the RG2 scope is the minimal role required to register an Arc machine, and Service2 is the identity scoped to just that role, Service2 is the only identity that satisfies both automatic authentication and least privilege simultaneously. Option A is rejected because Service1 is over-privileged; option D is rejected because it includes the over-privileged Service1.
Conclusion The correct choice is option B — Service2 only — because it is a service principal (enabling automatic, non-interactive authentication) and it carries only the minimum required role, satisfying every stated technical requirement.
Official Reference
- https://learn.microsoft.com/en-us/azure/azure-arc/servers/onboard-portal
- https://learn.microsoft.com/en-us/azure/azure-arc/servers/onboard-service-principal
These links open the official vendor documentation in a new tab.
Exam Strategy
When a question asks which Azure identity to use for onboarding an on-premises server to Azure Arc, first eliminate managed identities — they only exist on Azure-hosted resources, so on-premises machines cannot use them for non-interactive sign-in. Next, confirm that a service principal is required for automatic (non-interactive) authentication. Finally, if multiple service principals are available, apply least privilege: choose the one whose only relevant role is Azure Connected Machine Onboarding at the narrowest scope, and reject any service principal with broader permissions even if it could technically do the job.
Community Votes
67% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 1 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 1
-
fabiomartinsnet 👍 1 Answered BYou CAN use Service1 or Service2, but you SHOULD use Service2 because of enough permissions. Service 1 has more permission than necessary.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All AZ-802 Questions
Access 125 questions with complete answers and detailed explanations.
View Full AZ-802 Practice Test →