Authorizing Azure Automation Runbooks for AVD Scaling with Managed Identities
Short answer
A Configure a managed identity in Azure AD to authorize Azure Automation runbooks for managing the AVD host pool, as Run As accounts are deprecated and managed identities require minimal administrative effort.
Question
Domain Services (Azure AD DS) managed domain named contoso.com.
You plan to configure scaling for Pool1 by using Azure Automation runbooks.
You need to authorize the runbooks to manage the scaling of Pool1. The solution must minimize administrative effort.
What should you configure?
Key Takeaways
The main trap is choosing the older Run As account method; managed identities are now the mandatory standard for Azure Automation authentication due to retirement of Run As accounts.
This page explains how to authorize Azure Automation runbooks for Azure Virtual Desktop scaling using managed identities, replacing deprecated Run As accounts to minimize admin effort.
Common mistake: Choosing D (Run As account) because it was previously the standard method, ignoring its deprecation and the requirement to minimize administrative effort through automated identity management.
Expert Analysis
Managed Identities: The Correct Path for Automation The question asks to authorize Azure Automation runbooks to manage an Azure Virtual Desktop (AVD) host pool while minimizing administrative effort. The correct approach is to configure a managed identity in Azure Active Directory (Azure AD), now referred to as Microsoft Entra ID.
Why Managed Identity is the Answer Microsoft has deprecated and retired Azure Automation Run As accounts (Option D) as of September 30, 2023. Before this date, Run As accounts were a common method for authenticating runbooks. However, they required manual secret management and rotation, which contradicts the goal of minimizing administrative effort. Managed identities are the modern, recommended solution because the Azure platform manages the identity, eliminating the need for credential provisioning or rotation.
Comparing Options A and D While Option D (Run As account) was historically valid, it is no longer supported for new configurations. Option A (Managed Identity) aligns with current best practices and official Microsoft guidance for AVD scaling scripts. Using a managed identity allows the runbook to authenticate seamlessly to other Azure resources without storing secrets in code.
Other Options Option B (gMSA) is used for on-premises or hybrid domain-joined scenarios and is not relevant for authenticating Azure Automation runbooks to Azure services. Option C (Connections shared resource) is a feature within Azure Automation but does not inherently provide the authentication mechanism needed; it relies on underlying credentials or managed identities.
Conclusion To minimize administrative effort and follow current Microsoft standards, you must use a managed identity. This ensures the runbook can securely access and manage the AVD host pool without legacy credential overhead.
Official Reference
https://learn.microsoft.com/en-us/azure/virtual-desktop/set-up-scaling-script
This link opens the official vendor documentation in a new tab.
Exam Strategy
When configuring Azure Automation for cloud-native tasks like AVD scaling, always prioritize managed identities over Run As accounts. Understand that Run As accounts are deprecated and require manual secret management, which violates the 'minimize administrative effort' constraint. Look for keywords like 'managed by Azure platform' or 'no secret rotation' to identify managed identities as the optimal choice.
Frequently Asked Questions
Why is a Run As account incorrect for this scenario?
What is the primary benefit of using a managed identity here?
Community Votes
71% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 28 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 28
-
Nail 👍 14Correct
-
picho707 👍 7This is the statement from Microsoft regarding this question. The answer is A because D will be deprecated on September 30, 2023. Important Azure Automation Run As Account will retire on September 30, 2023 and will be replaced with Managed Identities. Before that date, you'll need to start migrating your runbooks to use managed identities. For more information, see migrating from an existing Run As accounts to managed identity to start migrating the runbooks from Run As account to managed identities before 30 September 2023.
-
MrHabanero 👍 4D is correct
-
afbnfz 👍 3 Answered AThe answer is A. Even back in 2021 MS was recommending Managed Identities for this task: "Managed identities would be the recommended method for runbook authentication going forward. Read the the guidance to migrate existing Run As accounts to Managed identities" https://azure.microsoft.com/en-us/updates/azure-automation-managed-identities-ga/
-
Player1 👍 3I'd go with "A" - Managed Identity as it respects minizing administrative effort. "The identity is managed by the Azure platform and users could eliminate the management overhead associated with managing Run As Account in the runbook code." https://azure.microsoft.com/en-us/updates/azure-automation-managed-identities-ga/
Show 23 more comments
-
Rednevi 👍 2 Answered A"A managed identity from Microsoft Entra ID allows your runbook to easily access other Microsoft Entra protected resources. The identity is managed by the Azure platform and doesn't require you to provision or rotate any secrets. For more information about managed identities in Microsoft Entra ID, see Managed identities for Azure resources. Managed identities are the recommended way to authenticate in your runbooks, and is the default authentication method for your Automation account." https://learn.microsoft.com/en-us/azure/automation/automation-security-overview
-
Leocan 👍 2 Answered AI take answer A because the Microsoft exam should adapt to the changes. Now that you have an Azure Automation account, you'll also need to set up a managed identity if you haven't already. Managed identities will help your runbook access other Azure AD-related resources as well as authenticate important automation processes. https://learn.microsoft.com/en-us/azure/virtual-desktop/set-up-scaling-script#create-a-managed-identity
-
Judith1969 👍 2A Azure Automation Run as accounts, including Classic Run as accounts have retired on 30 September 2023 and replaced with Managed Identities. You would no longer be able to create or renew Run as accounts through the Azure portal. https://learn.microsoft.com/en-us/azure/automation/migrate-run-as-accounts-managed-identity?tabs=sa-managed-identity
-
scottims 👍 2A should be correct now but D was before As of April 1, 2023, Run As accounts no longer work. We recommend you use managed identities instead. Another great MS question. I wander if they accept both on the exam https://learn.microsoft.com/en-us/azure/virtual-desktop/set-up-scaling-script#create-a-managed-identity
-
Phani1701 👍 2managed identity A managed identity from Azure Active Directory (Azure AD) allows your runbook to easily access other Azure AD-protected resources. The identity is managed by the Azure platform and doesn't require you to provision or rotate any secrets.
-
kevino81 👍 2 Answered AA is correct since Run as account will be removed "Azure Automation Run As Account will retire on September 30, 2023 and will be replaced with Managed Identities." https://learn.microsoft.com/en-us/azure/automation/automation-security-overview
-
Eltooth 👍 2 Answered DD is correct answer. https://docs.microsoft.com/en-us/azure/virtual-desktop/set-up-scaling-script Newer solution using MI: https://docs.microsoft.com/en-us/azure/automation/enable-managed-identity-for-automation
-
dpmore 👍 2Is it still correct as Azure Automation accounts now support MI ?
-
Wahle 👍 1A is correct (preferred), D is technically possible https://learn.microsoft.com/en-us/azure/virtual-desktop/set-up-scaling-script This scaling tool uses a Run As account with Azure Automation. Azure Automation Run As accounts will retire on September 30, 2023. Microsoft won't provide support beyond that date. From now through September 30, 2023, you can continue to use Azure Automation Run As accounts. This scaling tool won't be updated to create the resources using managed identities, however, you can transition to use managed identities and will need to before then. For more information, see Migrate from an existing Run As account to a managed identity.
-
jeff1988 👍 1 Answered ATo authorize Azure Automation runbooks to manage the scaling of your Azure Virtual Desktop host pool while minimizing administrative effort, you should configure a managed identity in Azure Active Directory (Azure AD). Managed identities simplify the process of granting the necessary permissions to Azure resources without the need for manual credential management. Therefore, the correct answer is: A. a managed identity in Azure Active Directory (Azure AD)
-
Moot2 👍 1 Answered AA create managed identity https://learn.microsoft.com/en-us/azure/virtual-desktop/set-up-scaling-script Azure automation account is already created
-
Lucarez 👍 1D is right, https://docs.microsoft.com/en-us/azure/virtual-desktop/set-up-scaling-script#create-an-azure-automation-run-as-account
-
Magis 👍 1 Answered AYou can use both but manage identity minimize administrative effort. Strongly recommended to use by MS. I am using it a lot.
-
lukiduc9625 👍 1One question: why "a managed identity in Azure AD"? Pool1 is NOT integrated with Azure AD but with Azure AD DS
-
Startkabels 👍 1 Answered DIll follow the official MS KB linked which reads you will need a Runas account.
-
Ivanvazovv 👍 1Scaling is creating and deleting virtual machines. This is done via ARM.
-
Domza 👍 1Need to create an "Azure Automation Run As account" NOT Run as Account
-
ESAJRR 👍 1 Answered AA. a managed identity in Azure Active Directory (Azure AD)
-
helpdeskinfra 👍 1 Answered DThe solution must minimize administrative effort.
-
belibebond 👍 1 Answered AManaged identities, MS really recommends it.
-
Domza 👍 1OMG, its "Azure Automation Account"
-
pappkarcsiii 👍 1 Answered DAzure Automation Run As account
-
jr_luciano 👍 1 Answered AThe answer is A
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All AZ-140 Questions
Access 64 questions with complete answers and detailed explanations.
View Full AZ-140 Practice Test →