Skip to content

Commit bfb14d7

Browse files
PratimDasguptaMashaMSFT
authored andcommitted
Learn Editor: Update managed-identity.md
Learn Editor: Update managed-identity.md edit pass
1 parent 1f37131 commit bfb14d7

2 files changed

Lines changed: 49 additions & 4 deletions

File tree

azure-sql/virtual-machines/windows/configure-azure-ad-authentication-for-sql-vm.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,11 @@ The following example enables Microsoft Entra authentication for specific unregi
306306
Set-AzVMExtension -ExtensionName "SqlIaasExtension" -ResourceGroupName $resourceGroupName -VMName $sqlVMName -Publisher "Microsoft.SqlServer.Management" -ExtensionType "SqlIaaSAgent" -TypeHandlerVersion 2.0 -Location $region -SettingString '{"ServerConfigurationsManagementSettings": {"AADAuthenticationSettings": {"ClientId":$clientId, "EnableForGivenInstances":["MSSQLSERVER","MSSQLSERVER01"], "CheckPermissions":true}},"DeploymentTokenSettings":{"DeploymentToken":12345678}}'
307307
```
308308

309+
## Create logins and users
310+
311+
Follow the steps in the [Microsoft Entra tutorial](/sql/sql-server/azure-arc/entra-authentication-setup-tutorial#create-logins-and-users) to create logins and Users for the managed identity.
312+
313+
309314
## Limitations
310315

311316
Consider the following limitations:

docs/sql-server/azure-arc/managed-identity.md

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
title: Managed Identity
3-
description: Describes the features and implementation to use managed identity with SQL Server
3+
description: Learn how to use a managed identity with SQL Server 2025.
44
author: PratimDasgupta
55
ms.author: prdasgu
66
ms.reviewer: mikeray, randolphwest, mathoma, vanto
7-
ms.date: 05/19/2025
7+
ms.date: 05/23/2025
88
ms.service: sql
99
ms.topic: how-to
1010
# CustomerIntent: As a database engineer I need to understand how to implement managed identity with SQL Server 2025.
@@ -32,7 +32,7 @@ When using managed identity with SQL Server enabled by Azure Arc, consider the f
3232
- Only system-assigned managed identities are supported.
3333
- SQL Server uses this Azure Arc server level managed identity as the **primary managed identity**.
3434
- SQL Server can use this primary managed identity in either `inbound` and/or `outbound` connections.
35-
- `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](../../sql-server/azure-arc/entra-authentication-setup-tutorial.md).
35+
- `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](../../sql-server/azure-arc/entra-authentication-setup-tutorial.md).
3636
- `Outbound connections` are SQL Server connections to Azure resources, like backup to URL, or connecting to Azure Key Vault.
3737
- App Registration **can't** enable a SQL Server to make outbound connections. Outbound connections need a primary managed identity assigned to the SQL Server.
3838

@@ -153,9 +153,49 @@ If you need to restore to previous registry settings, follow these steps.
153153

154154
For details, review [How to add, modify, or delete registry subkeys and values by using a .reg file](https://support.microsoft.com/topic/how-to-add-modify-or-delete-registry-subkeys-and-values-by-using-a-reg-file-9c7f37cf-a5e9-e1cd-c4fa-2a26218a1a23).
155155

156+
## Grant application permissions to the identity
157+
158+
The system-assigned managed identity, which uses the Arc-enabled machine name, must have the following Microsoft Graph application permissions (app roles): `User.Read.All`, `GroupMember.Read.All`, and `Application.Read.All`.
159+
160+
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.
161+
162+
The following PowerShell script grants the required permissions to the managed identity:
163+
164+
```powershell
165+
Install-Module AzureAD
166+
Connect-AzureAD -TenantId <ENTER-YOUR-TENANT-ID>
167+
$api = Get-AzureADServicePrincipal -Filter "appId eq '00000003-0000-0000-c000-000000000000'" # Microsoft Graph API
168+
169+
$AAD_AppRole = $api.AppRoles | Where-Object { $_.Value -eq “User.Read.All" }
170+
$managedIdentity = Get-AzureADServicePrincipal -SearchString "<Arc-Machine-Name>"
171+
New-AzureADServiceAppRoleAssignment -ObjectId $managedIdentity[0].ObjectId -PrincipalId $managedIdentity[0].ObjectId -ResourceId $api.ObjectId -Id $AAD_AppRole.Id
172+
173+
$AAD_AppRole = $api.AppRoles | Where-Object { $_.Value -eq “Groupmember.Read.All" }
174+
$managedIdentity = Get-AzureADServicePrincipal -SearchString "<Arc-Machine-Name>"
175+
New-AzureADServiceAppRoleAssignment -ObjectId $managedIdentity[0].ObjectId -PrincipalId $managedIdentity[0].ObjectId -ResourceId $api.ObjectId -Id $AAD_AppRole.Id
176+
177+
$AAD_AppRole = $api.AppRoles | Where-Object { $_.Value -eq “Application.Read.All" }
178+
$managedIdentity = Get-AzureADServicePrincipal -SearchString "<Arc-Machine-Name>"
179+
New-AzureADServiceAppRoleAssignment -ObjectId $managedIdentity[0].ObjectId -PrincipalId $managedIdentity[0].ObjectId -ResourceId $api.ObjectId -Id $AAD_AppRole.Id
180+
181+
```
182+
183+
## Create logins and users
184+
185+
Follow the steps in the [Microsoft Entra tutorial](../../sql-server/azure-arc/entra-authentication-setup-tutorial.md#create-logins-and-users) to create logins and users for the managed identity.
186+
187+
## Limitations
188+
189+
Consider the following limitations when using a managed identity with SQL Server 2025:
190+
191+
- Microsoft Entra authentication is only supported with Arc enabled SQL Server 2025 running on Windows Server.
192+
- Using Microsoft Entra authentication with failover cluster instances is not supported.
193+
- 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`.
194+
- 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.
195+
- 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.
156196

157197
## Related content
158198

159199
- [Microsoft Entra authentication for SQL Server](../../relational-databases/security/authentication-access/azure-ad-authentication-sql-server-overview.md)
160200
- [What are managed identities for Azure resources?](/entra/identity/managed-identities-azure-resources/overview)
161-
- [Enable Microsoft Entra authentication - SQL Server on Azure VMs](/azure/azure-sql/virtual-machines/windows/configure-azure-ad-authentication-for-sql-vm)
201+
- [Enable Microsoft Entra authentication - SQL Server on Azure VMs](/azure/azure-sql/virtual-machines/windows/configure-azure-ad-authentication-for-sql-vm)

0 commit comments

Comments
 (0)