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
@@ -35,15 +35,15 @@ When using managed identity with SQL Server enabled by Azure Arc, consider the f
35
35
- Only system-assigned managed identities are supported.
36
36
- SQL Server uses this Azure Arc server level managed identity as the **primary managed identity**.
37
37
- SQL Server can use this primary managed identity in either `inbound` and/or `outbound` connections.
38
-
-`Inbound connections` are logins and users connecting to SQL Server. Inbound connections can also be achieved by using [App Registration available from SQL Server 2022](entra-authentication-setup-tutorial.md).
38
+
-`Inbound connections` are logins and users connecting to SQL Server. Inbound connections can also be achieved by using [App registration](entra-authentication-setup-tutorial.md), starting in [!INCLUDE [sssql22-md](../../includes/sssql22-md.md)].
39
39
-`Outbound connections` are SQL Server connections to Azure resources, like backup to URL, or connecting to Azure Key Vault.
40
40
- App Registration **can't** enable a SQL Server to make outbound connections. Outbound connections need a primary managed identity assigned to the SQL Server.
41
41
42
42
## Prerequisites
43
43
44
44
Before you can use a managed identity with SQL Server enabled by Azure Arc, ensure that you meet the following prerequisites:
45
45
46
-
-[Connect the SQL Server instance to Azure Arc](connect.md).
46
+
-[Connect your SQL Server to Azure Arc](connect.md).
47
47
- The latest version of the [Azure Extension for SQL Server](release-notes.md).
48
48
49
49
## Enable the primary managed identity
@@ -52,19 +52,18 @@ If you've installed the Azure Extension for SQL Server to your server, you can e
52
52
53
53
### [Azure portal](#tab/portal)
54
54
55
-
To enable the primary managed identity in the Azure portal, follow these steps:
55
+
To enable the primary managed identity in the Azure portal, follow these steps:
56
56
57
57
1. Go to your [SQL Server enabled by Azure Arc](https://portal.azure.com/#view/Microsoft_Azure_ArcCenterUX/ArcCenterMenuBlade/~/sqlServerInstances) resource in the Azure portal.
58
58
1. Under **Settings**, select **Microsoft Entra ID and Purview** to open the **Microsoft Entra ID and Purview** page.
59
59
60
60
> [!NOTE]
61
-
> If you don't see the **Enable Microsoft Entra ID authentication** option, ensure that your SQL Server instance is connected to Azure Arc and that you have the latest SQL extension installed.
61
+
> If you don't see the **Enable Microsoft Entra ID authentication** option, ensure that your SQL Server instance is connected to Azure Arc and that you have the latest SQL extension installed.
62
62
63
63
1. On the **Microsoft Entra ID and Purview** page, check the box next to **Use a primary managed identity** and then use **Save** to apply your configuration:
64
64
65
65
:::image type="content" source="media/managed-identity/entra-portal.png" alt-text="Screenshot of the Microsoft Entra option in the Azure portal." lightbox="media/managed-identity/entra-portal.png":::
66
66
67
-
68
67
### [Manually](#tab/manual)
69
68
70
69
It's possible to manually enable the primary managed identity for your SQL Server instance by updating the registry, but should be done with extreme caution.
@@ -75,7 +74,7 @@ Grant **Read & execute** operating system permissions on the folder `C:\ProgramD
75
74
76
75
:::image type="content" source="media/managed-identity/tokens-folder-permissions.png" alt-text="Screenshot of Tokens folder Security properties tab.":::
77
76
78
-
You might need to grant admin permissions for the SQL Server service account on the `AzureConnectedMachineAgent` folder prior to the `Tokens` folder:
77
+
You might need to grant admin permissions for the SQL Server service account on the `AzureConnectedMachineAgent` folder before the `Tokens` folder:
79
78
80
79
:::image type="content" source="media/managed-identity/azure-connected-machine-agent-folder-permissions.png" alt-text="Screenshot of AzureConnectedMachineAgent folder Security properties tab.":::
81
80
@@ -153,7 +152,7 @@ This step backs up the registry before you make any changes. You can import this
153
152
154
153
#### Add entries
155
154
156
-
In this step, you'll add entries to the registry with Registry Editor.
155
+
In this step, you add entries to the registry with Registry Editor.
157
156
158
157
1. Navigate this subkey: **\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQLServer\FederatedAuthentication**.
159
158
@@ -171,7 +170,7 @@ In this step, you'll add entries to the registry with Registry Editor.
171
170
172
171
If you need to restore to previous registry settings, follow these steps.
173
172
174
-
1. Open the Registry Editor as described above.
173
+
1. Open the Registry Editor as described previously.
175
174
1. Select **File** from the menu.
176
175
1. Select **Import**.
177
176
1. Navigate to the location of your saved backup file.
@@ -187,35 +186,33 @@ The system-assigned managed identity, which uses the Arc-enabled machine name, m
187
186
188
187
You can use PowerShell to grant required permissions to the managed identity. Alternatively, you can [create a role-assignable group](/entra/identity/role-based-access-control/groups-create-eligible). After the group is created, assign the **Directory readers** role to the group, and add all system-assigned managed identities for your Arc-enabled machines to the group.
189
188
190
-
The following PowerShell script grants the required permissions to the managed identity:
189
+
The following PowerShell script grants the required permissions to the managed identity. Make sure this script is run on PowerShell 7.5 or a later version, and has the `Microsoft.Graph` module 2.28 or later installed.
191
190
192
191
```powershell
193
-
# Update these variables to match your Azure & Arc machine setup
Write-Output "Successfully assigned role '$roleValue' to '$managedIdentityName'."
242
-
} catch {
243
+
}
244
+
catch {
243
245
Write-Warning "Failed to assign role '$roleValue': $_"
244
246
}
245
-
} else {
247
+
}
248
+
else {
246
249
Write-Warning "Role '$roleValue' not found in Microsoft Graph AppRoles."
247
250
}
248
251
}
@@ -261,6 +264,7 @@ Consider the following limitations when using a managed identity with SQL Server
261
264
- The identity you choose to authenticate to SQL Server has to have either the **Directory Readers** role in Microsoft Entra ID or the following three Microsoft Graph application permissions (app roles): `User.Read.All`, `GroupMember.Read.All`, and `Application.Read.All`.
262
265
- Once Microsoft Entra authentication is enabled, disabling isn't advisable. Disabling Microsoft Entra authentication forcefully by deleting registry entries can result in unpredictable behavior with SQL Server 2025.
263
266
- Authenticating to SQL Server on Arc machines through Microsoft Entra authentication using the [FIDO2 method](/azure/active-directory/authentication/howto-authentication-passwordless-faqs) isn't currently supported.
267
+
-[OPENROWSET BULK](../../t-sql/functions/openrowset-bulk-transact-sql.md) operations can also read the tokens folder `C:\ProgramData\AzureConnectedMachineAgent\Tokens\`. The `BULK` option requires either `ADMINISTER BULK OPERATIONS` or `ADMINISTER DATABASE BULK OPERATIONS` permissions. These permissions should be treated as equivalent to **[sysadmin](../../relational-databases/security/authentication-access/server-level-roles.md)**.
0 commit comments