Skip to content

Commit d946feb

Browse files
authored
Merge pull request #116289 from MicrosoftDocs/release-azuresql
DO NOT MERGE
2 parents 5c71190 + 439e1db commit d946feb

File tree

2,090 files changed

+71602
-68811
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,090 files changed

+71602
-68811
lines changed

.openpublishing.redirection.json

Lines changed: 1823 additions & 1 deletion
Large diffs are not rendered by default.

articles/active-directory/conditional-access/concept-conditional-access-cloud-apps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Administrators can assign a Conditional Access policy to the following cloud app
3333
- [Office 365 (preview)](#office-365-preview)
3434
- Azure Analysis Services
3535
- Azure DevOps
36-
- [Azure SQL Database and Data Warehouse](../../sql-database/sql-database-conditional-access.md)
36+
- [Azure SQL Database and Data Warehouse](../../azure-sql/database/conditional-access-configure.md)
3737
- Dynamics CRM Online
3838
- Microsoft Application Insights Analytics
3939
- [Microsoft Azure Information Protection](/azure/information-protection/faqs#i-see-azure-information-protection-is-listed-as-an-available-cloud-app-for-conditional-accesshow-does-this-work)

articles/active-directory/managed-identities-azure-resources/tutorial-windows-vm-access-sql.md

Lines changed: 39 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Tutorial`:` Use a managed identity to access Azure SQL - Windows - Azure AD
3-
description: A tutorial that walks you through the process of using a Windows VM system-assigned managed identity to access Azure SQL.
2+
title: Tutorial`:` Use a managed identity to access Azure SQL Database - Windows - Azure AD
3+
description: A tutorial that walks you through the process of using a Windows VM system-assigned managed identity to access Azure SQL Database.
44
services: active-directory
55
documentationcenter: ''
66
author: MarkusVi
@@ -20,57 +20,56 @@ ms.collection: M365-identity-device-management
2020

2121
[!INCLUDE [preview-notice](../../../includes/active-directory-msi-preview-notice.md)]
2222

23-
This tutorial shows you how to use a system-assigned identity for a Windows virtual machine (VM) to access an Azure SQL server. Managed Service Identities are automatically managed by Azure and enable you to authenticate to services that support Azure AD authentication, without needing to insert credentials into your code. You learn how to:
23+
This tutorial shows you how to use a system-assigned identity for a Windows virtual machine (VM) to access Azure SQL Database. Managed Service Identities are automatically managed by Azure and enable you to authenticate to services that support Azure AD authentication, without needing to insert credentials into your code. You learn how to:
2424

2525
> [!div class="checklist"]
26-
> * Grant your VM access to an Azure SQL server
27-
> * Enable Azure AD authentication for the SQL server
26+
>
27+
> * Grant your VM access to Azure SQL Database
28+
> * Enable Azure AD authentication
2829
> * Create a contained user in the database that represents the VM's system assigned identity
29-
> * Get an access token using the VM identity and use it to query an Azure SQL server
30+
> * Get an access token using the VM identity and use it to query Azure SQL Database
3031
3132
## Prerequisites
3233

3334
[!INCLUDE [msi-tut-prereqs](../../../includes/active-directory-msi-tut-prereqs.md)]
3435

35-
3636
## Enable
3737

3838
[!INCLUDE [msi-tut-enable](../../../includes/active-directory-msi-tut-enable.md)]
3939

40-
4140
## Grant access
4241

43-
To grant your VM access to a database in an Azure SQL Server, you can use an existing SQL server or create a new one. To create a new server and database using the Azure portal, follow this [Azure SQL quickstart](https://docs.microsoft.com/azure/sql-database/sql-database-get-started-portal). There are also quickstarts that use the Azure CLI and Azure PowerShell in the [Azure SQL documentation](https://docs.microsoft.com/azure/sql-database/).
42+
To grant your VM access to a database in Azure SQL Database, you can use an existing [logical SQL server](../../azure-sql/database/logical-servers.md) or create a new one. To create a new server and database using the Azure portal, follow this [Azure SQL quickstart](https://docs.microsoft.com/azure/sql-database/sql-database-get-started-portal). There are also quickstarts that use the Azure CLI and Azure PowerShell in the [Azure SQL documentation](https://docs.microsoft.com/azure/sql-database/).
4443

4544
There are two steps to granting your VM access to a database:
4645

47-
1. Enable Azure AD authentication for the SQL server.
46+
1. Enable Azure AD authentication for the server.
4847
2. Create a **contained user** in the database that represents the VM's system-assigned identity.
4948

5049
### Enable Azure AD authentication
5150

52-
**To [configure Azure AD authentication for the SQL server](/azure/sql-database/sql-database-aad-authentication-configure):**
51+
**To [configure Azure AD authentication](/azure/sql-database/sql-database-aad-authentication-configure):**
5352

54-
1. In the Azure portal, select **SQL servers** from the left-hand navigation.
55-
2. Click the SQL server to be enabled for Azure AD authentication.
56-
3. In the **Settings** section of the blade, click **Active Directory admin**.
57-
4. In the command bar, click **Set admin**.
58-
5. Select an Azure AD user account to be made an administrator of the server, and click **Select.**
59-
6. In the command bar, click **Save.**
53+
1. In the Azure portal, select **SQL servers** from the left-hand navigation.
54+
2. Click the SQL server to be enabled for Azure AD authentication.
55+
3. In the **Settings** section of the blade, click **Active Directory admin**.
56+
4. In the command bar, click **Set admin**.
57+
5. Select an Azure AD user account to be made an administrator of the server, and click **Select.**
58+
6. In the command bar, click **Save.**
6059

6160
### Create contained user
6261

6362
This section shows how to create a contained user in the database that represents the VM's system assigned identity. For this step, you need [Microsoft SQL Server Management Studio](https://docs.microsoft.com/sql/ssms/download-sql-server-management-studio-ssms) (SSMS). Before beginning, it may also be helpful to review the following articles for background on Azure AD integration:
6463

65-
- [Universal Authentication with SQL Database and SQL Data Warehouse (SSMS support for MFA)](/azure/sql-database/sql-database-ssms-mfa-authentication)
66-
- [Configure and manage Azure Active Directory authentication with SQL Database or SQL Data Warehouse](/azure/sql-database/sql-database-aad-authentication-configure)
64+
* [Universal Authentication with SQL Database and SQL Data Warehouse (SSMS support for MFA)](/azure/sql-database/sql-database-ssms-mfa-authentication)
65+
* [Configure and manage Azure Active Directory authentication with SQL Database or SQL Data Warehouse](/azure/sql-database/sql-database-aad-authentication-configure)
6766

68-
SQL DB requires unique AAD display names. With this, the AAD accounts such as users, groups and Service Principals (applications) and VM names enabled for managed identity must be uniquely defined in AAD regarding their display names. SQL DB checks the AAD display name during T-SQL creation of such users and if it is not unique, the command fails requesting to provide a unique AAD display name for a given account.
67+
SQL Database requires unique AAD display names. With this, the AAD accounts such as users, groups and Service Principals (applications) and VM names enabled for managed identity must be uniquely defined in AAD regarding their display names. SQL Database checks the AAD display name during T-SQL creation of such users and if it is not unique, the command fails requesting to provide a unique AAD display name for a given account.
6968

7069
**To create a contained user:**
7170

7271
1. Start SQL Server Management Studio.
73-
2. In the **Connect to Server** dialog, Enter your SQL server name in the **Server name** field.
72+
2. In the **Connect to Server** dialog, Enter your server name in the **Server name** field.
7473
3. In the **Authentication** field, select **Active Directory - Universal with MFA support**.
7574
4. In the **User name** field, enter the name of the Azure AD account that you set as the server administrator, for example, [email protected]
7675
5. Click **Options**.
@@ -82,24 +81,24 @@ SQL DB requires unique AAD display names. With this, the AAD accounts such as us
8281

8382
> [!NOTE]
8483
> `VMName` in the following command is the name of the VM that you enabled system assigned identity on in the prerequsites section.
85-
86-
```
84+
85+
```sql
8786
CREATE USER [VMName] FROM EXTERNAL PROVIDER
8887
```
89-
88+
9089
The command should complete successfully, creating the contained user for the VM's system-assigned identity.
9190
11. Clear the query window, enter the following line, and click **Execute** in the toolbar:
9291
9392
> [!NOTE]
9493
> `VMName` in the following command is the name of the VM that you enabled system assigned identity on in the prerequsites section.
95-
96-
```
94+
95+
```sql
9796
ALTER ROLE db_datareader ADD MEMBER [VMName]
9897
```
9998
10099
The command should complete successfully, granting the contained user the ability to read the entire database.
101100
102-
Code running in the VM can now get a token using its system-assigned managed identity and use the token to authenticate to the SQL server.
101+
Code running in the VM can now get a token using its system-assigned managed identity and use the token to authenticate to the server.
103102
104103
## Access data
105104
@@ -139,7 +138,7 @@ catch (Exception e)
139138
}
140139
141140
//
142-
// Open a connection to the SQL server using the access token.
141+
// Open a connection to the server using the access token.
143142
//
144143
if (accessToken != null) {
145144
string connectionString = "Data Source=<AZURE-SQL-SERVERNAME>; Initial Catalog=<DATABASE>;";
@@ -151,29 +150,29 @@ if (accessToken != null) {
151150

152151
Alternatively, a quick way to test the end to end setup without having to write and deploy an app on the VM is using PowerShell.
153152

154-
1. In the portal, navigate to **Virtual Machines** and go to your Windows virtual machine and in the **Overview**, click **Connect**.
155-
2. Enter in your **Username** and **Password** for which you added when you created the Windows VM.
156-
3. Now that you have created a **Remote Desktop Connection** with the virtual machine, open **PowerShell** in the remote session.
157-
4. Using PowerShell’s `Invoke-WebRequest`, make a request to the local managed identity's endpoint to get an access token for Azure SQL.
153+
1. In the portal, navigate to **Virtual Machines** and go to your Windows virtual machine and in the **Overview**, click **Connect**.
154+
2. Enter in your **Username** and **Password** for which you added when you created the Windows VM.
155+
3. Now that you have created a **Remote Desktop Connection** with the virtual machine, open **PowerShell** in the remote session.
156+
4. Using PowerShell’s `Invoke-WebRequest`, make a request to the local managed identity's endpoint to get an access token for Azure SQL.
158157
159158
```powershell
160159
$response = Invoke-WebRequest -Uri 'http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https%3A%2F%2Fdatabase.windows.net%2F' -Method GET -Headers @{Metadata="true"}
161160
```
162-
163-
Convert the response from a JSON object to a PowerShell object.
164-
161+
162+
Convert the response from a JSON object to a PowerShell object.
163+
165164
```powershell
166165
$content = $response.Content | ConvertFrom-Json
167166
```
168167
169168
Extract the access token from the response.
170-
169+
171170
```powershell
172171
$AccessToken = $content.access_token
173172
```
174173
175-
5. Open a connection to the SQL server. Remember to replace the values for AZURE-SQL-SERVERNAME and DATABASE.
176-
174+
5. Open a connection to the server. Remember to replace the values for AZURE-SQL-SERVERNAME and DATABASE.
175+
177176
```powershell
178177
$SqlConnection = New-Object System.Data.SqlClient.SqlConnection
179178
$SqlConnection.ConnectionString = "Data Source = <AZURE-SQL-SERVERNAME>; Initial Catalog = <DATABASE>"
@@ -195,15 +194,13 @@ Alternatively, a quick way to test the end to end setup without having to write
195194
196195
Examine the value of `$DataSet.Tables[0]` to view the results of the query.
197196
198-
199197
## Disable
200198
201199
[!INCLUDE [msi-tut-disable](../../../includes/active-directory-msi-tut-disable.md)]
202200
203-
204201
## Next steps
205202
206-
In this tutorial, you learned how to use a system-assigned managed identity to access Azure SQL server. To learn more about Azure SQL Server see:
203+
In this tutorial, you learned how to use a system-assigned managed identity to access Azure SQL Database. To learn more about Azure SQL Database see:
207204
208205
> [!div class="nextstepaction"]
209-
> [Azure SQL Database service](/azure/sql-database/sql-database-technical-overview)
206+
> [Azure SQL Database](/azure/sql-database/sql-database-technical-overview)

articles/advisor/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
items:
3535
- name: Security Center
3636
href: https://azure.microsoft.com/services/security-center/
37-
- name: SQL DB Advisor
37+
- name: SQL Database Advisor
3838
href: https://azure.microsoft.com/documentation/articles/sql-database-advisor/
3939
- name: App Service
4040
href: https://docs.microsoft.com/azure/app-service/app-service-best-practices

articles/aks/operator-best-practices-identity.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ As you deploy and maintain clusters in Azure Kubernetes Service (AKS), you need
1515
This best practices article focuses on how a cluster operator can manage access and identity for AKS clusters. In this article, you learn how to:
1616

1717
> [!div class="checklist"]
18+
>
1819
> * Authenticate AKS cluster users with Azure Active Directory
1920
> * Control access to resources with role-based access controls (RBAC)
2021
> * Use a managed identity to authenticate themselves with other services
@@ -93,14 +94,14 @@ Managed identities for Azure resources (currently implemented as an associated A
9394
9495
When pods request access to an Azure service, network rules redirect the traffic to the Node Management Identity (NMI) server. The NMI server identifies pods that request access to Azure services based on their remote address, and queries the Managed Identity Controller (MIC). The MIC checks for Azure identity mappings in the AKS cluster, and the NMI server then requests an access token from Azure Active Directory (AD) based on the pod's identity mapping. Azure AD provides access to the NMI server, which is returned to the pod. This access token can be used by the pod to then request access to services in Azure.
9596
96-
In the following example, a developer creates a pod that uses a managed identity to request access to an Azure SQL Server instance:
97+
In the following example, a developer creates a pod that uses a managed identity to request access to Azure SQL Database:
9798
9899
![Pod identities allow a pod to automatically request access to other services](media/operator-best-practices-identity/pod-identities.png)
99100
100101
1. Cluster operator first creates a service account that can be used to map identities when pods request access to services.
101102
1. The NMI server and MIC are deployed to relay any pod requests for access tokens to Azure AD.
102103
1. A developer deploys a pod with a managed identity that requests an access token through the NMI server.
103-
1. The token is returned to the pod and used to access an Azure SQL Server instance.
104+
1. The token is returned to the pod and used to access Azure SQL Database
104105
105106
> [!NOTE]
106107
> Managed pod identities is an open source project, and is not supported by Azure technical support.

0 commit comments

Comments
 (0)