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
# Migrate from a Run As account to Managed Identities
@@ -14,32 +14,22 @@ ms.date: 02/21/2023
14
14
> - 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](/articles/automation/automation-security-overview.md#managed-identities). For more information, see [migrating from an existing Run As accounts to managed identity](/articles/automation/migrate-run-as-accounts-managed-identity?tabs=run-as-account#sample-scripts).
15
15
> - Delaying the feature has a direct impact on our support burden, as it would cause upgrades of mobility agent to fail.
16
16
17
-
This article shows you how to migrate a Managed Identities for Azure Site Recovery applications. Azure Automation Accounts are used by Azure Site Recovery customers to auto-update the agents of their protected virtual machines. Site Recovery creates Azure Automation Run As Accounts when you enable replication via the IaaS VM Blade and Recovery Services Vault.
17
+
This article shows you how to migrate your runbooks to use a Managed Identities for Azure Site Recovery. Azure Automation Accounts are used by Azure Site Recovery customers to auto-update the agents of their protected virtual machines. Site Recovery creates Azure Automation Run As Accounts when you enable replication via the IaaS VM Blade and Recovery Services Vault.
18
18
19
19
On Azure, managed identities eliminate the need for developers having to manage credentials by providing an identity for the Azure resource in Azure Active Directory (Azure AD) and using it to obtain Azure AD tokens.
20
20
21
21
## Prerequisites
22
22
23
-
Before you migrate from a Run As account to a managed identity:
24
-
25
-
1. Create a [system-assigned](../automation/enable-managed-identity-for-automation.md) or [user-assigned](../automation/add-user-assigned-identity.md) managed identity, or create both types. To learn more about the differences between them, see [Managed identity types](../active-directory/managed-identities-azure-resources/overview.md#managed-identity-types).
26
-
27
-
> [!NOTE]
28
-
> - User-assigned identities are supported for cloud jobs only. It isn't possible to use the Automation account's user-managed identity on a hybrid runbook worker. To use hybrid jobs, you must create system-assigned identities.
29
-
> - There are two ways to use managed identities in hybrid runbook worker scripts: either the system-assigned managed identity for the Automation account *or* the virtual machine (VM) managed identity for an Azure VM running as a hybrid runbook worker.
30
-
> - The VM's user-assigned managed identity and the VM's system-assigned managed identity will *not* work in an Automation account that's configured with an Automation account's managed identity. When you enable the Automation account's managed identity, you can use only the Automation account's system-assigned managed identity and not the VM managed identity. For more information, see [Use runbook authentication with managed identities](../automation/automation-hrw-run-runbooks.md).
31
-
32
-
1. Assign the same role to the managed identity to access the Azure resources that match the Run As account. Follow the steps in [Check the role assignment for the Azure Automation Run As account](../automation/manage-run-as-account.md#check-role-assignment-for-azure-automation-run-as-account).
33
-
34
-
Ensure that you don't assign high-privilege permissions like contributor or owner to the Run As account. Follow the role-based access control (RBAC) guidelines to limit the permissions from the default contributor permissions assigned to a Run As account by using [this script](../automation/manage-run-as-account.md#limit-run-as-account-permissions).
23
+
Before you migrate from a Run As account to a managed identity, ensure that you have the appropriate roles to create a system-assigned identity for your automation account and to assign it the Contributor role in the corresponding recovery services vault.
35
24
36
25
## Benefits of managed identities
37
26
38
27
Here are some of the benefits of using managed identities:
39
28
40
-
- You don't need to manage credentials. Credentials aren’t even accessible to you.
41
-
- You can use managed identities to authenticate to any resource that supports [Azure AD authentication](../authentication/overview-authentication.md), including your own applications.
42
-
- Managed identities can be used at no extra cost.
29
+
-**Credentials access** - You don't need to manage credentials.
30
+
-**Simplified authentication** - You can use managed identities to authenticate to any resource that supports [Azure AD authentication](/articles/authentication/overview-authentication.md), including your own applications.
31
+
-**Cost effective** - Managed identities can be used at no extra cost.
32
+
-**Double encryption** - Managed identity is also used to encrypt/decrypt data and metadata using the customer-managed key stored in Azure Key Vault, providing double encryption.
43
33
44
34
> [!NOTE]
45
35
> Managed identities for Azure resources is the new name for the service formerly known as Managed Service Identity (MSI).
@@ -58,19 +48,19 @@ You can configure your managed identities through:
58
48
> For more information about migration cadence and the support timeline for Run As account creation and certificate renewal, see the [frequently asked questions](../automation/automation-managed-identity-faq.md).
59
49
60
50
61
-
### Portal experience
51
+
### From Azure portal
62
52
63
53
**To migrate your Azure Automation account authentication type from a Run As to a managed identity authentication, follow these steps:**
64
54
65
-
1. In the [Azure portal](https://portal.azure.com), navigate and select the recovery services vault that you want to migrate.
55
+
1. In the [Azure portal](https://portal.azure.com), select the recovery services vault for which you want to migrate the runbooks.
66
56
67
57
1. On the homepage of your recovery services vault page, do the following:
68
-
1. On the left pane, under the **Manage** section, select **Site Recovery infrastructure**.
58
+
1. On the left pane, under **Manage**, select **Site Recovery infrastructure**.
69
59
:::image type="content" source="./media/how-to-migrate-from-run-as-to-managed-identities/manage-section.png" alt-text="Screenshot of the **Site Recovery infrastructure** page.":::
70
-
1. Under the **For Azure virtual machines** section, select **Extension update settings**.
60
+
1. Under **For Azure virtual machines**, select **Extension update settings**.
71
61
This page details the authentication type for the automation account that is being used to manage the Site Recovery extensions.
72
62
73
-
1. On this page, select the **Migrate** option to migrate the authentication type for your automation accounts to use Managed Identities.
63
+
1. On this page, select **Migrate** to migrate the authentication type for your automation accounts to use Managed Identities.
74
64
75
65
:::image type="content" source="./media/how-to-migrate-from-run-as-to-managed-identities/extension-update-settings.png" alt-text="Screenshot of the Create Recovery Services vault page.":::
76
66
@@ -85,142 +75,37 @@ When you successfully migrate from a Run As to a Managed Identities account, the
85
75
86
76
### Link an existing managed identity account to vault
87
77
88
-
You can link an existing managed identity Automation account to your Recovery Services vault. To do so, follow these steps:
78
+
To link an existing managed identity Automation account to your Recovery Services vault. Follow these steps:
89
79
90
80
#### Enable the managed identity for the vault
91
81
92
-
1. Go to your selected managed identity automation account. Under under**Account settings**, select **Identity**.
82
+
1. Go to the automation account that you have selected. Under **Account settings**, select **Identity**.
93
83
94
84
:::image type="content" source="./media/how-to-migrate-from-run-as-to-managed-identities/mi-automation-account.png" alt-text="Screenshot that shows the identity settings page.":::
95
85
96
-
1. Under the **System assigned** section, change the **Status** to **On** and select **Save**.
86
+
1. Under the **System assigned**, change the **Status** to **On** and select **Save**.
97
87
98
88
An Object ID is generated. The vault is now registered with Azure Active
99
89
Directory.
100
90
:::image type="content" source="./media/hybrid-how-to-enable-replication-private-endpoints/enable-managed-identity-in-vault.png" alt-text="Screenshot that shows the system identity settings page.":::
101
91
102
-
1.Navigate back to your recovery services vault. On the left pane, select the **Access control (IAM)** option.
92
+
1.Go back to your recovery services vault. On the left pane, select the **Access control (IAM)** option.
103
93
:::image type="content" source="./media/how-to-migrate-from-run-as-to-managed-identities/add-mi-iam.png" alt-text="Screenshot that shows IAM settings page.":::
104
94
1. Select **Add** > **Add role assignment** > **Contributor** to open the **Add role assignment** page.
105
-
1. On the **Add role assignment** page, ensure that the**Managed identity** option is selected.
106
-
1. Select the **Select members** option. This opens the **Select managed identities** pane. On this pane do the following:
107
-
1. In the **Select** field, paste the name of the managed identity automation account.
95
+
1. On the **Add role assignment** page, ensure to select**Managed identity**.
96
+
1. Select the **Select members**. In the **Select managed identities** pane, do the following:
97
+
1. In the **Select** field, enter the name of the managed identity automation account.
108
98
1. In the **Managed identity** field, select **All system-assigned managed identities**.
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.
-[Implementing managed identities for Microsoft Azure Resources](https://www.pluralsight.com/courses/microsoft-azure-resources-managed-identities-implementing).
225
-
-[FAQ for migrating from a Run As account to a managed identity](../automation/automation-managed-identity-faq).
110
+
-[FAQ for migrating from a Run As account to a managed identity](/articles/automation/automation-managed-identity-faq).
226
111
-[FAQ for Managed Identities](../active-directory/managed-identities-azure-resources/managed-identities-faq.md)
0 commit comments