You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#Customer intent: As an implementer, I want answers to various questions.
10
10
---
11
11
12
-
# FAQ for migrating from a Run As account to a managed identity
12
+
# FAQ for migrating from a Run As account to managed identities
13
13
14
-
The following FAQ can help you migrate from a Run As account to a managed identity in Azure Automation. If you have any other questions about the capabilities, post them on the [discussion forum](https://aka.ms/retirement-announcement-automation-runbook-start-using-managed-identities). When a question is frequently asked, we add it to this article so that it benefits everyone.
14
+
The following FAQ can help you migrate from a Run As account to a Managed identity in Azure Automation. If you have any other questions about the capabilities, post them on the [discussion forum](https://aka.ms/retirement-announcement-automation-runbook-start-using-managed-identities). When a question is frequently asked, we add it to this article so that it benefits everyone.
15
15
16
16
## How long will you support a Run As account?
17
17
18
-
Automation Run As accounts will be supported until *September 30, 2023*. Although we continue to support existing users, we recommend that all new users use managed identities for runbook authentication.
19
-
20
-
Existing users can still create a Run As account. You can go to the account properties and renew a certificate upon expiration until *January 30, 2023*. After that date, you won't be able to create a Run As account from the Azure portal.
21
-
22
-
You'll still be able to create a Run As account through a [PowerShell script](./create-run-as-account.md#create-account-using-powershell) until support ends. You can [use this script](https://github.com/azureautomation/runbooks/blob/master/Utility/AzRunAs/RunAsAccountAssessAndRenew.ps1) to renew the certificate after *January 30, 2023*, until *September 30, 2023*. This script will assess the Automation account that has configured Run As accounts and renew the certificate if you choose to do so. On confirmation, the script will renew the key credentials of the Azure Active Directory (Azure AD) app and upload new a self-signed certificate to the Azure AD app.
18
+
Automation Run As accounts will be supported until *30 September 2023*. Moreover, starting 01 April 2023, creation of **new** Run As accounts in Azure Automation will not be possible. Renewing of certificates for existing Run As accounts would be possible only till the end of support.
23
19
24
20
## Will existing runbooks that use the Run As account be able to authenticate?
25
-
Yes, they'll be able to authenticate. There will be no impact to existing runbooks that use a Run As account.
26
-
27
-
## How can I renew an existing Run As account after January 30, 2023, when portal support to renew the account is removed?
28
-
You can [use this script](https://github.com/azureautomation/runbooks/blob/master/Utility/AzRunAs/RunAsAccountAssessAndRenew.ps1) to renew the Run As account certificate after January 30, 2023, until September 30, 2023.
21
+
Yes, they'll be able to authenticate. There will be no impact to existing runbooks that use a Run As account. After 30 September 2023, all runbook executions using RunAs accounts, including Classic Run As accounts wouldn't be supported. Hence, you must migrate all runbooks to use Managed identities before that date.
29
22
30
-
## Can Run As accounts still be created after September 30, 2023, when Run As accounts will retire?
31
-
Yes, you can still create Run As accounts by using the [PowerShell script](../automation/create-run-as-account.md#create-account-using-powershell). However, this will be an unsupported scenario.
32
-
33
-
## Can Run As accounts still be renewed after September 30, 2023, when Run As account will retire?
34
-
You can use [this script](https://github.com/azureautomation/runbooks/blob/master/Utility/AzRunAs/RunAsAccountAssessAndRenew.ps1) to renew the Run As account certificate after September 30, 2023, when Run As accounts will retire. However, it will be an unsupported scenario.
23
+
## My Run as account will expire soon, how can I renew it?
24
+
If your Run As account certificate is going to expire soon, it's a good time to start using Managed identities for authentication instead of renewing the certificate. However, if you still want to renew it, you would be able to do it through the portal only till 30 September 2023.
35
25
26
+
## Can I create new Run As accounts?
27
+
From 1 April 2023, creation of new Run As accounts wouldn't be possible. We strongly recommend that you start using Managed identities for authentication instead of creating new Run As accounts.
28
+
36
29
## Will runbooks that still use the Run As account be able to authenticate after September 30, 2023?
37
-
Yes, the runbooks will be able to authenticate until the Run As account certificate expires.
30
+
Yes, the runbooks will be able to authenticate until the Run As account certificate expires. After 30 September 2023, all runbook executions using RunAs accounts wouldn't be supported.
38
31
39
32
## What is a managed identity?
40
33
Applications use managed identities in Azure AD when they're connecting to resources that support Azure AD authentication. Applications can use managed identities to obtain Azure AD tokens without managing credentials, secrets, certificates, or keys.
@@ -57,9 +50,6 @@ Run As accounts also have a management overhead that involves creating a service
57
50
## Can a managed identity be used for both cloud and hybrid jobs?
58
51
Azure Automation supports [system-assigned managed identities](./automation-security-overview.md#managed-identities) for both cloud and hybrid jobs. Currently, Azure Automation [user-assigned managed identities](./automation-security-overview.md) can be used for cloud jobs only and can't be used for jobs that run on a hybrid worker.
59
52
60
-
## Can I use a Run As account for new Automation account?
61
-
Yes, but only in a scenario where managed identities aren't supported for specific on-premises resources. We'll allow the creation of a Run As account through a [PowerShell script](./create-run-as-account.md#create-account-using-powershell).
62
-
63
53
## How can I migrate from an existing Run As account to a managed identity?
64
54
Follow the steps in [Migrate an existing Run As account to a managed identity](./migrate-run-as-accounts-managed-identity.md).
Copy file name to clipboardExpand all lines: articles/automation/migrate-run-as-accounts-managed-identity.md
+54-53Lines changed: 54 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,19 @@
1
1
---
2
-
title: Migrate from a Run As account to a managed identity
3
-
description: This article describes how to migrate from a Run As account to a managed identity in Azure Automation.
2
+
title: Migrate from a Run As account to Managed identities
3
+
description: This article describes how to migrate from a Run As account to managed identities in Azure Automation.
4
4
services: automation
5
5
ms.subservice: process-automation
6
-
ms.date: 02/11/2023
6
+
ms.date: 02/15/2023
7
7
ms.topic: conceptual
8
8
ms.custom: devx-track-azurepowershell
9
9
---
10
10
11
-
# Migrate from an existing Run As account to a managed identity
11
+
# Migrate from an existing Run As account to Managed identities
12
12
13
13
> [!IMPORTANT]
14
-
> 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. However, we recommend that you transition to [managed identities](../automation/automation-security-overview.md#managed-identities) before *September 30, 2023*.
15
-
>
16
-
> For more information about migration cadence and the support timeline for Run As account creation and certificate renewal, see the [frequently asked questions](automation-managed-identity-faq.md).
14
+
> Azure Automation Run As accounts will retire on *30 September 2023* and completely move to [Managed Identities](automation-security-overview.md#managed-identities). All runbook executions using RunAs accounts, including Classic Run As accounts wouldn't be supported after this date. Starting 01 April 2023, the creation of **new** Run As accounts in Azure Automation will not be possible.
15
+
16
+
For more information about migration cadence and the support timeline for Run As account creation and certificate renewal, see the [frequently asked questions](automation-managed-identity-faq.md).
17
17
18
18
Run As accounts in Azure Automation provide authentication for managing resources deployed through Azure Resource Manager or the classic deployment model. Whenever a Run As account is created, an Azure AD application is registered, and a self-signed certificate is generated. The certificate is valid for one year. Renewing the certificate every year before it expires keeps the Automation account working but adds overhead.
19
19
@@ -38,7 +38,8 @@ Before you migrate from a Run As account or Classic Run As account to a managed
38
38
39
39
For example, if the Automation account is required only to start or stop an Azure VM, then the permissions assigned to the Run As account need to be only for starting or stopping the VM. Similarly, assign read-only permissions if a runbook is reading from Azure Blob Storage. For more information, see [Azure Automation security guidelines](../automation/automation-security-guidelines.md#authentication-certificate-and-identities).
40
40
41
-
1. If you are using Classic Run As accounts, ensure that you have [migrated](../virtual-machines/classic-vm-deprecation.md) resources deployed through classic deployment model to Azure Resource Manager.
41
+
1. If you're using Classic Run As accounts, ensure that you have [migrated](../virtual-machines/classic-vm-deprecation.md) resources deployed through classic deployment model to Azure Resource Manager.
42
+
1. Use [this script](https://github.com/azureautomation/runbooks/blob/master/Utility/AzRunAs/Check-AutomationRunAsAccountRoleAssignments.ps1) to find out which Automation accounts are using a Run As account. If your Azure Automation accounts contain a Run As account, it will have the built-in contributor role assigned to it by default. You can use the script to check the Azure Automation Run As accounts and determine if their role assignment is the default one or if it has been changed to a different role definition.
42
43
43
44
## Migrate from an Automation Run As account to a managed identity
44
45
@@ -50,7 +51,7 @@ To migrate from an Automation Run As account or Classic Run As account to a mana
50
51
51
52
For managed identity support, use the `Connect-AzAccount` cmdlet. To learn more about this cmdlet, see [Connect-AzAccount](/powershell/module/az.accounts/Connect-AzAccount?branch=main&view=azps-8.3.0) in the PowerShell reference.
52
53
53
-
- If you're using Az modules, update to the latest version by following the steps in the [Update Azure PowerShell modules](./automation-update-azure-modules.md?branch=main#update-az-modules) article.
54
+
- If you're using `Az` modules, update to the latest version by following the steps in the [Update Azure PowerShell modules](./automation-update-azure-modules.md?branch=main#update-az-modules) article.
54
55
- If you're using AzureRM modules, update `AzureRM.Profile` to the latest version and replace it by using the `Add-AzureRMAccount` cmdlet with `Connect-AzureRMAccount –Identity`.
55
56
56
57
To understand the changes to the runbook code that are required before you can use managed identities, use the [sample scripts](#sample-scripts).
@@ -59,49 +60,7 @@ To migrate from an Automation Run As account or Classic Run As account to a mana
59
60
60
61
## Sample scripts
61
62
62
-
The following examples of runbook scripts fetch the Resource Manager resources by using the Run As account (service principal) and the managed identity.
Write-Output ($Resource.ResourceName + " of type " + $Resource.ResourceType)
101
-
}
102
-
Write-Output ("")
103
-
}
104
-
```
63
+
The following examples of runbook scripts fetch the Resource Manager resources by using the Run As account (service principal) and the managed identity. You would notice the difference in runbook code at the beginning of the runbook, where it authenticates against the resource.
Write-Output ($Resource.ResourceName + " of type " + $Resource.ResourceType)
160
+
}
161
+
Write-Output ("")
162
+
}
163
+
```
164
+
164
165
---
165
166
166
167
## Graphical runbooks
@@ -175,7 +176,7 @@ foreach ($ResourceGroup in $ResourceGroups)
175
176
176
177
:::image type="content" source="./media/migrate-run-as-account-managed-identity/activity-parameter-configuration.png" alt-text="Screenshot that shows examining the parameters used by a cmdlet.":::
177
178
178
-
For use with the Run As account, the cmdlet will use the `ServicePrinicipalCertificate` parameter set to `ApplicationId`. `CertificateThumbprint` will be from `RunAsAccountConnection`.
179
+
For use with the Run As account, the cmdlet uses the `ServicePrinicipalCertificate` parameter set to `ApplicationId`. `CertificateThumbprint` will be from `RunAsAccountConnection`.
179
180
180
181
:::image type="content" source="./media/migrate-run-as-account-managed-identity/parameter-sets-inline.png" alt-text="Screenshot that shows parameter sets." lightbox="./media/migrate-run-as-account-managed-identity/parameter-sets-expanded.png":::
0 commit comments