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
You can enable Azure Arc-enabled servers for multiple Windows or Linux machines in your environment with several flexible options depending on your requirements. Using the template script we provide, you can automate every step of the installation, including establishing the connection to Azure Arc. However, you are required to interactively execute this script with an account that has elevated permissions on the target machine and in Azure.
12
12
13
-
To connect the machines to Azure Arc-enabled servers, you can use an Azure Active Directory [service principal](../../active-directory/develop/app-objects-and-service-principals.md) instead of using your privileged identity to [interactively connect the machine](onboard-portal.md). A service principal is a special limited management identity that is granted only the minimum permission necessary to connect machines to Azure using the `azcmagent` command. This is safer than using a higher privileged account like a Tenant Administrator, and follows our access control security best practices. The service principal is used only during onboarding, it is not used for any other purpose.
13
+
To connect the machines to Azure Arc-enabled servers, you can use an Azure Active Directory [service principal](../../active-directory/develop/app-objects-and-service-principals.md) instead of using your privileged identity to [interactively connect the machine](onboard-portal.md). This service principal is a special limited management identity that is granted only the minimum permission necessary to connect machines to Azure using the `azcmagent` command. This is safer than using a higher privileged account like a Tenant Administrator, and follows our access control security best practices. The service principal is used only during onboarding; it is not used for any other purpose.
14
14
15
-
The installation methods to install and configure the Connected Machine agent requires that the automated method you use has administrator permissions on the machines. On Linux, by using the root account and on Windows, as a member of the Local Administrators group.
15
+
The installation methods to install and configure the Connected Machine agent requires that the automated method you use has administrator permissions on the machines: on Linux by using the root account, and on Windows as a member of the Local Administrators group.
16
16
17
17
Before you get started, be sure to review the [prerequisites](agent-overview.md#prerequisites) and verify that your subscription and resources meet the requirements. For information about supported regions and other related considerations, see [supported Azure regions](overview.md#supported-regions). Also review our [at-scale planning guide](plan-at-scale-deployment.md) to understand the design and deployment criteria, as well as our management and monitoring recommendations.
18
18
19
19
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
20
20
21
-
## Create a Service Principal for onboarding at scale
21
+
## Create a service principal for onboarding at scale
22
22
23
-
You can use [Azure PowerShell](/powershell/azure/install-az-ps) to create a service principal with the [New-AzADServicePrincipal](/powershell/module/Az.Resources/New-AzADServicePrincipal) cmdlet. Or you can follow the steps listed under [Create a Service Principal using the Azure portal](../../active-directory/develop/howto-create-service-principal-portal.md) to complete this task.
23
+
You can create a service principal in the Azure portal or by using Azure PowerShell.
24
24
25
25
> [!NOTE]
26
-
> Before you create a service principal, your account must be a member of the **Owner** or **User Access Administrator** role in the subscription that you want to use for onboarding. If you don't have sufficient permissions to configure role assignments, the service principal might be created, but it won't be able to onboard machines.
27
-
>
26
+
> To create a service principal and assign roles, your account must be a member of the **Owner** or **User Access Administrator** role in the subscription that you want to use for onboarding. If you don't have sufficient permissions to configure role assignments, the service principal might still be created, but it won't be able to onboard machines.
28
27
29
-
To create the service principal using PowerShell, perform the following steps.
28
+
### Azure portal
29
+
30
+
The Azure Arc service in the Azure portal provides a streamlined way to create a service principal that can be used to connect your hybrid machines to Azure.
31
+
32
+
1. In the Azure portal, navigate to Azure Arc, then select **Service principals** in the left menu.
33
+
1. Select **Add**.
34
+
1. Enter a name for your service principal.
35
+
1. Choose whether the service principal will have access to an entire subscription, or only to a specific resource group.
36
+
1. Select the subscription (and resource group, if applicable) to which the service principal will have access.
37
+
1. In the **Client secret** section, select the duration for which your generated client secret will be in use. You can optionally enter a friendly name of your choice in the **Description** field.
38
+
1. In the **Role assignment** section, select **Azure Connected Machine Onboarding**.
39
+
1. Select **Create**.
40
+
41
+
:::image type="content" source="media/onboard-service-principal/new-azure-arc-service-principal.png" alt-text="Screenshot of the Azure Arc service principal creation screen in the Azure portal.":::
42
+
43
+
### Azure PowerShell
44
+
45
+
You can use [Azure PowerShell](/powershell/azure/install-az-ps) to create a service principal with the [New-AzADServicePrincipal](/powershell/module/Az.Resources/New-AzADServicePrincipal) cmdlet.
30
46
31
47
1. Run the following command. You must store the output of the [`New-AzADServicePrincipal`](/powershell/module/az.resources/new-azadserviceprincipal) cmdlet in a variable, or you will not be able to retrieve the password needed in a later step.
32
48
@@ -52,18 +68,17 @@ To create the service principal using PowerShell, perform the following steps.
52
68
$credential.GetNetworkCredential().password
53
69
```
54
70
55
-
3. In the output, find the password value under the field **password** and copy it. Also find the value under the field **ApplicationId** and copy it also. Save them for later in a secure place. If you forget or lose your service principal password, you can reset it using the [`New-AzADSpCredential`](/powershell/module/az.resources/new-azadspcredential) cmdlet.
71
+
3. In the output, find the values for the fields **password** and **ApplicationId**. You'll need these values later, so save them in a secure place. If you forget or lose your service principal password, you can reset it using the [`New-AzADSpCredential`](/powershell/module/az.resources/new-azadspcredential) cmdlet.
56
72
57
73
The values from the following properties are used with parameters passed to the `azcmagent`:
58
74
59
-
* The value from the **ApplicationId** property is used for the `--service-principal-id` parameter value
60
-
* The value from the **password** property is used for the `--service-principal-secret` parameter used to connect the agent.
75
+
- The value from the **ApplicationId** property is used for the `--service-principal-id` parameter value
76
+
- The value from the **password** property is used for the `--service-principal-secret` parameter used to connect the agent.
61
77
62
-
> [!NOTE]
78
+
> [!TIP]
63
79
> Make sure to use the service principal **ApplicationId** property, not the **Id** property.
64
-
>
65
80
66
-
The **Azure Connected Machine Onboarding** role contains only the permissions required to onboard a machine. You can assign the service principal permission to allow its scope to include a resource group or a subscription. To add role assignment, see [Assign Azure roles using the Azure portal](../../role-based-access-control/role-assignments-portal.md) or [Assign Azure roles using Azure CLI](../../role-based-access-control/role-assignments-cli.md).
81
+
The **Azure Connected Machine Onboarding** role contains only the permissions required to onboard a machine. You can assign the service principal permission to allow its scope to include a resource group or a subscription. To add role assignments, see [Assign Azure roles using the Azure portal](../../role-based-access-control/role-assignments-portal.md) or [Assign Azure roles using Azure CLI](../../role-based-access-control/role-assignments-cli.md).
67
82
68
83
## Generate the installation script from the Azure portal
69
84
@@ -103,28 +118,25 @@ Taking the script template created earlier, you can install and configure the Co
103
118
104
119
The following are the settings that you configure the `azcmagent` command to use for the service principal.
105
120
106
-
* `service-principal-id` : The unique identifier (GUID) that represents the application ID of the service principal.
107
-
* `service-principal-secret` | The service principal password.
108
-
* `tenant-id` : The unique identifier (GUID) that represents your dedicated instance of Azure AD.
109
-
* `subscription-id` : The subscription ID (GUID) of your Azure subscription that you want the machines in.
110
-
* `resource-group` : The resource group name where you want your connected machines to belong to.
111
-
* `location` : See [supported Azure regions](overview.md#supported-regions). This location can be the same or different, as the resource group's location.
112
-
* `resource-name` : (*Optional*) Used for the Azure resource representation of your on-premises machine. If you do not specify this value, the machine hostname is used.
121
+
- `service-principal-id` : The unique identifier (GUID) that represents the application ID of the service principal.
122
+
- `service-principal-secret` | The service principal password.
123
+
- `tenant-id` : The unique identifier (GUID) that represents your dedicated instance of Azure AD.
124
+
- `subscription-id` : The subscription ID (GUID) of your Azure subscription that you want the machines in.
125
+
- `resource-group` : The resource group name where you want your connected machines to belong to.
126
+
- `location` : See [supported Azure regions](overview.md#supported-regions). This location can be the same or different, as the resource group's location.
127
+
- `resource-name` : (*Optional*) Used for the Azure resource representation of your on-premises machine. If you do not specify this value, the machine hostname is used.
113
128
114
129
You can learn more about the `azcmagent` command-line tool by reviewing the [Azcmagent Reference](./manage-agent.md).
115
130
116
131
>[!NOTE]
117
132
>The Windows PowerShell script only supports running from a 64-bit version of Windows PowerShell.
118
-
>
119
133
120
134
After you install the agent and configure it to connect to Azure Arc-enabled servers, go to the Azure portal to verify that the server has successfully connected. View your machines in the [Azure portal](https://aka.ms/hybridmachineportal).
121
135
122
-

136
+

123
137
124
138
## Next steps
125
139
126
-
- Troubleshooting information can be found in the [Troubleshoot Connected Machine agent guide](troubleshoot-agent-onboard.md).
127
-
128
140
- Review the [Planning and deployment guide](plan-at-scale-deployment.md) to plan for deploying Azure Arc-enabled servers at any scale and implement centralized management and monitoring.
129
-
130
-
- Learn how to manage your machine using [Azure Policy](../../governance/policy/overview.md), for such things as VM [guest configuration](../../governance/policy/concepts/guest-configuration.md), verify the machine is reporting to the expected Log Analytics workspace, enable monitoring with [VM insights](../../azure-monitor/vm/vminsights-enable-policy.md), and much more.
141
+
- Learn how to [troubleshoot agent connection issues](troubleshoot-agent-onboard.md).
142
+
- Learn how to manage your machines using [Azure Policy](../../governance/policy/overview.md) for such things as VM [guest configuration](../../governance/policy/concepts/guest-configuration.md), verifying that machines are reporting to the expected Log Analytics workspace, monitoring with [VM insights](../../azure-monitor/vm/vminsights-enable-policy.md), and more.
0 commit comments