Skip to content

Commit 07c2ca9

Browse files
author
Ankita Dutta
committed
images and page edits
1 parent e6d328f commit 07c2ca9

File tree

8 files changed

+68
-16
lines changed

8 files changed

+68
-16
lines changed

articles/site-recovery/how-to-migrate-run-as-accounts-managed-identity.md

Lines changed: 68 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,18 @@ author: ankitaduttaMSFT
55
ms.service: site-recovery
66
ms.author: ankitadutta
77
ms.topic: how-to
8-
ms.date: 01/19/2023
8+
ms.date: 02/21/2023
99
---
1010

11-
# Manage identities
11+
# Migrate from a Run As account to Managed Identities
1212

1313
> [!IMPORTANT]
1414
> - 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).
1515
> - Delaying the feature has a direct impact on our support burden, as it would cause upgrades of mobility agent to fail.
1616
1717
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.
1818

19-
On Azure, managed identities eliminate the need for developers having to manage credentials by providing an identity for the Azure resource
20-
in Azure Active Directory (Azure AD) and using it to obtain Azure AD tokens.
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.
2120

2221
## Prerequisites
2322

@@ -33,32 +32,88 @@ Before you migrate from a Run As account to a managed identity:
3332
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).
3433

3534
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).
35+
36+
## Benefits of managed identities
37+
38+
Here are some of the benefits of using managed identities:
39+
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.
43+
44+
> [!NOTE]
45+
> Managed identities for Azure resources is the new name for the service formerly known as Managed Service Identity (MSI).
46+
47+
## Migrate from an existing Run As account to a managed identity
3648

37-
## Configure managed identities
49+
### Configure managed identities
3850

3951
You can configure your managed identities through:
4052

4153
- Azure portal
4254
- Azure CLI
4355
- your Azure Resource Manager (ARM) template
4456

45-
When a managed identity is added, deleted, or modified on a running container app, the app doesn't automatically restart and a new revision isn't created.
46-
4757
> [!NOTE]
4858
> 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).
4959
50-
> [!NOTE]
51-
> When adding a managed identity to a container app deployed before April 11, 2022, you must create a new revision.
52-
53-
## Migrate from an existing Run As account to a managed identity
5460

5561
### Portal experience
5662

57-
-
63+
**To migrate your Azure Automation account authentication type from a Run As to a managed identity authentication, follow these steps:**
64+
65+
1. In the [Azure portal](https://portal.azure.com), navigate and select the recovery services vault that you want to migrate.
66+
67+
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**.
69+
:::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**.
71+
This page details the authentication type for the automation account that is being used to manage the Site Recovery extensions.
72+
73+
1. On this page, select the **Migrate** option to migrate the authentication type for your automation accounts to use Managed Identities.
74+
75+
:::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+
77+
1. After the successful migration of your automation account, the authentication type for the linked account details on the **Extension update settings** page is updated.
78+
79+
When you successfully migrate from a Run As to a Managed Identities account, the following changes are reflected on the Automation Run As Accounts :
80+
81+
- System Assigned Managed Identity is enabled for the account (if not already enabled).
82+
- The **Contributor** role permission is assigned to the Recovery Services vault’s subscription.
83+
- The script that updates the mobility agent to use Managed Identity based authentication is updated.
84+
85+
86+
### Link an existing managed identity account to vault
87+
88+
You can link an existing managed identity Automation account to your Recovery Services vault. To do so, follow these steps:
89+
90+
#### Enable the managed identity for the vault
91+
92+
1. Go to your selected managed identity automation account. Under under **Account settings**, select **Identity**.
93+
94+
:::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+
96+
1. Under the **System assigned** section, change the **Status** to **On** and select **Save**.
97+
98+
An Object ID is generated. The vault is now registered with Azure Active
99+
Directory.
100+
:::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+
102+
1. Navigate back to your recovery services vault. On the left pane, select the **Access control (IAM)** option.
103+
:::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+
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.
108+
1. In the **Managed identity** field, select **All system-assigned managed identities**.
109+
1. Select the **Select** option.
110+
:::image type="content" source="./media/how-to-migrate-from-run-as-to-managed-identities/select-mi.png" alt-text="Screenshot that shows select managed identity settings page.":::
111+
1. Select **Review + assign**.
112+
58113

59114
### Azure CLI sample scripts
60115

61-
The following examples of runbook scripts fetch the Resource Manager resources by using the Run As account (service principal) and the managed identity.
116+
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.
62117

63118
# [Run As account](#tab/run-as-account)
64119

@@ -166,9 +221,6 @@ foreach ($ResourceGroup in $ResourceGroups)
166221

167222
Learn more about:
168223
- [Managed identities](../active-directory/managed-identities-azure-resources/overview).
169-
- [Using a system-assigned managed identity for an Azure Automation account](../automation/enable-managed-identity-for-automation).
170-
- [Using a user-assigned managed identity for an Azure Automation account](../automation/add-user-assigned-identity).
171-
- [Connecting from your application to resources without handling credentials](../active-directory/managed-identities-azure-resources/overview-for-developers?tabs=portal%2Cdotnet)
172224
- [Implementing managed identities for Microsoft Azure Resources](https://www.pluralsight.com/courses/microsoft-azure-resources-managed-identities-implementing).
173225
- [FAQ for migrating from a Run As account to a managed identity](../automation/automation-managed-identity-faq).
174226
- [FAQ for Managed Identities](../active-directory/managed-identities-azure-resources/managed-identities-faq.md)
67.4 KB
Loading
Loading
149 KB
Loading
154 KB
Loading
197 KB
Loading
147 KB
Loading
156 KB
Loading

0 commit comments

Comments
 (0)