Skip to content

Commit c43244e

Browse files
Merge pull request #34937 from MicrosoftDocs/main
Auto Publish – main to live - 2025-08-08 22:30 UTC
2 parents df3949a + 4cf30aa commit c43244e

File tree

41 files changed

+715
-622
lines changed

Some content is hidden

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

41 files changed

+715
-622
lines changed

azure-sql/azure-sql-iaas-vs-paas-what-is-overview.md

Lines changed: 17 additions & 13 deletions
Large diffs are not rendered by default.

azure-sql/database/active-geo-replication-overview.md

Lines changed: 41 additions & 46 deletions
Large diffs are not rendered by default.

azure-sql/database/authentication-azure-ad-only-authentication-policy-how-to.md

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: This article guides you through using Azure Policy to enforce Micro
55
author: VanMSFT
66
ms.author: vanto
77
ms.reviewer: wiassaf, vanto, mathoma
8-
ms.date: 06/30/2025
8+
ms.date: 08/07/2025
99
ms.service: azure-sql
1010
ms.subservice: security
1111
ms.topic: how-to
@@ -19,12 +19,12 @@ monikerRange: "=azuresql || =azuresql-db || =azuresql-mi"
1919
This article guides you through creating an Azure Policy that would enforce Microsoft Entra-only authentication when users create an Azure SQL Managed Instance, or a [logical server](logical-servers.md) for Azure SQL Database. To learn more about Microsoft Entra-only authentication during resource creation, see [Create server with Microsoft Entra-only authentication enabled in Azure SQL](authentication-azure-ad-only-authentication-create-server.md).
2020

2121
> [!NOTE]
22-
> Although Azure Active Directory (Azure AD) has been [renamed to Microsoft Entra ID](/entra/fundamentals/new-name), Microsoft Entra-only and Azure AD-only authentication are used interchangeably in this article.
22+
> Azure Active Directory (Azure AD) has been [renamed to Microsoft Entra ID](/entra/fundamentals/new-name).
2323
2424
In this article, you learn how to:
2525

2626
> [!div class="checklist"]
27-
> - Create an Azure Policy that enforces logical server or managed instance creation with [Microsoft Entra-only authentication](authentication-azure-ad-only-authentication.md) enabled
27+
> - Create an Azure Policy that enforces logical server or managed instance creation with [Microsoft Entra-only authentication with Azure SQL](authentication-azure-ad-only-authentication.md) enabled
2828
> - Check Azure Policy compliance
2929
3030
## Prerequisite
@@ -40,41 +40,38 @@ Start off by creating an Azure Policy enforcing SQL Database or SQL Managed Inst
4040
1. Under the Authoring settings, select **Definitions**.
4141
1. In the **Search** box, search for *Microsoft Entra-only authentication*.
4242

43-
There are a few built-in policies available to enforce Microsoft Entra-only authentication. Look for the one available for your service:
44-
45-
- Azure SQL Database should have Microsoft Entra-only Authentication enabled
46-
- Azure SQL Managed Instance should have Microsoft Entra-only Authentication enabled
43+
There are a few built-in policies available to enforce Microsoft Entra-only authentication. Look for the one available for your service:
44+
45+
- Azure SQL Database should have Microsoft Entra-only Authentication enabled
46+
- Azure SQL Managed Instance should have Microsoft Entra-only Authentication enabled
4747

4848
1. Select the policy name for your service. In this example, we'll use Azure SQL Database. Select **Azure SQL Database should have Microsoft Entra-only authentication enabled**.
4949
1. Select **Assign policy** in the new menu.
5050

51-
> [!NOTE]
52-
> The JSON script in the menu shows the built-in policy definition that can be used as a template to build a custom Azure Policy for SQL Database. The default is set to `Audit`.
53-
54-
:::image type="content" source="media/authentication-azure-ad-only-authentication-policy-how-to/assign-policy-azure-ad-only-authentication.png" alt-text="Screenshot of assigning Azure Policy for Microsoft Entra-only authentication." lightbox="media/authentication-azure-ad-only-authentication-policy-how-to/assign-policy-azure-ad-only-authentication.png":::
55-
51+
> [!NOTE]
52+
> The JSON script in the menu shows the built-in policy definition that can be used as a template to build a custom Azure Policy for SQL Database. The default is set to `Audit`.
53+
54+
:::image type="content" source="media/authentication-azure-ad-only-authentication-policy-how-to/assign-policy-azure-ad-only-authentication.png" alt-text="Screenshot of assigning Azure Policy for Microsoft Entra-only authentication." lightbox="media/authentication-azure-ad-only-authentication-policy-how-to/assign-policy-azure-ad-only-authentication.png":::
55+
5656
1. In the **Basics** tab, add a **Scope** by using the selector (**...**) on the side of the box.
5757
1. In the **Scope** pane, select your **Subscription** from the dropdown list menu, and select a **Resource Group** for this policy. Once you're done, use the **Select** button to save the selection.
5858

59-
> [!NOTE]
60-
> If you don't select a resource group, the policy applies to the whole subscription.
61-
62-
:::image type="content" source="media/authentication-azure-ad-only-authentication-policy-how-to/adding-scope-policy-azure-ad-only-authentication.png" alt-text="Screenshot of adding Azure Policy scope for Microsoft Entra-only authentication.":::
63-
59+
> [!NOTE]
60+
> If you don't select a resource group, the policy applies to the whole subscription.
61+
62+
:::image type="content" source="media/authentication-azure-ad-only-authentication-policy-how-to/adding-scope-policy-azure-ad-only-authentication.png" alt-text="Screenshot of adding Azure Policy scope for Microsoft Entra-only authentication.":::
63+
6464
1. Once you're back on the **Basics** tab, customize the **Assignment name** and provide an optional **Description**. Make sure the **Policy enforcement** is **Enabled**.
6565
1. Go over to the **Parameters** tab. Unselect the option **Only show parameters that require input**.
6666
1. Under **Effect**, select **Deny**. This setting prevents creating a logical server without Microsoft Entra-only authentication enabled.
6767

68-
:::image type="content" source="media/authentication-azure-ad-only-authentication-policy-how-to/deny-policy-azure-ad-only-authentication.png" alt-text="Screenshot of Azure Policy effect parameter for Microsoft Entra-only authentication." lightbox="media/authentication-azure-ad-only-authentication-policy-how-to/deny-policy-azure-ad-only-authentication.png":::
68+
:::image type="content" source="media/authentication-azure-ad-only-authentication-policy-how-to/deny-policy-azure-ad-only-authentication.png" alt-text="Screenshot of Azure Policy effect parameter for Microsoft Entra-only authentication." lightbox="media/authentication-azure-ad-only-authentication-policy-how-to/deny-policy-azure-ad-only-authentication.png":::
6969

7070
1. In the **Non-compliance messages** tab, you can customize the policy message that displays if a violation of the policy has occurred. The message will let users know what policy was enforced during server creation.
7171

72-
:::image type="content" source="media/authentication-azure-ad-only-authentication-policy-how-to/non-compliance-message-policy-azure-ad-only-authentication.png" alt-text="Screenshot of Azure Policy noncompliance message for Microsoft Entra-only authentication." lightbox="media/authentication-azure-ad-only-authentication-policy-how-to/non-compliance-message-policy-azure-ad-only-authentication.png":::
73-
74-
1. Select **Review + create**. Review the policy and select the **Create** button.
75-
76-
> [!NOTE]
77-
> It can take some time for the newly created policy to be enforced.
72+
:::image type="content" source="media/authentication-azure-ad-only-authentication-policy-how-to/non-compliance-message-policy-azure-ad-only-authentication.png" alt-text="Screenshot of Azure Policy noncompliance message for Microsoft Entra-only authentication." lightbox="media/authentication-azure-ad-only-authentication-policy-how-to/non-compliance-message-policy-azure-ad-only-authentication.png":::
73+
74+
1. Select **Review + create**. Review the policy and select the **Create** button. It can take some time for the newly created policy to be enforced.
7875

7976
## Check policy compliance
8077

@@ -86,8 +83,7 @@ Once the logical server is created with Microsoft Entra-only authentication, the
8683

8784
If the resource group that the policy was chosen to cover contains already created servers, the policy report will indicate those resources that are compliant and noncompliant.
8885

89-
> [!NOTE]
90-
> Updating the compliance report can take some time. Changes related to resource creation or Microsoft Entra-only authentication settings aren't reported immediately.
86+
Updating the compliance report can take some time. Changes related to resource creation or Microsoft Entra-only authentication settings aren't reported immediately.
9187

9288
## Provision a server
9389

azure-sql/database/azure-sql-dotnet-entity-framework-core-quickstart.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ description: Learn how to connect to a database in Azure SQL Database and query
44
author: WilliamDAssafMSFT
55
ms.author: wiassaf
66
ms.reviewer: alexwolf, mathoma, vanto, randolphwest
7-
ms.date: 04/10/2025
7+
ms.date: 08/07/2025
88
ms.service: azure-sql-database
99
ms.subservice: security
1010
ms.topic: quickstart
11-
monikerRange: "=azuresql || =azuresql-db"
1211
ms.custom:
1312
- passwordless-dotnet
1413
- sfi-image-nochange
1514
- sfi-ropc-nochange
15+
monikerRange: "=azuresql || =azuresql-db"
1616
---
1717

1818
# Connect to and query Azure SQL Database using .NET and Entity Framework Core
@@ -219,7 +219,7 @@ To update the database schema to match your data model using Entity Framework Co
219219

220220
---
221221

222-
3. A `Migrations` folder should appear in your project directory, along with a file called `InitialCreate` with unique numbers prepended. Run the migration to create the database using the following command:
222+
3. A `Migrations` folder should appear in your project directory, along with a file called `InitialCreate` with unique numbers prepended. Run the migration to create the database using the following command, and the Entity Framework Core tooling creates the database schema in Azure defined by the `PersonDbContext` class.
223223

224224
## [Visual Studio](#tab/visual-studio)
225225

@@ -235,8 +235,6 @@ To update the database schema to match your data model using Entity Framework Co
235235

236236
---
237237

238-
The Entity Framework Core tooling creates the database schema in Azure defined by the `PersonDbContext` class.
239-
240238
## Test the app locally
241239

242240
The app is ready to be tested locally. Make sure you're signed in to Visual Studio or the Azure CLI with the same account you set as the admin for your database.
@@ -247,9 +245,9 @@ The app is ready to be tested locally. Make sure you're signed in to Visual Stud
247245

248246
1. Modify the sample JSON to include values for the first name and family name. Select **Execute** to add a new record to the database. The API returns a successful response.
249247

250-
:::image type="content" source="media/passwordless-connections/api-testing-small.png" alt-text="Screenshot showing how to test the API." lightbox="media/passwordless-connections/api-testing.png":::
248+
:::image type="content" source="media/azure-sql-dotnet-entity-framework-core-quickstart/api-testing-small.png" alt-text="Screenshot showing how to test the API." lightbox="media/azure-sql-dotnet-entity-framework-core-quickstart/api-testing.png":::
251249

252-
1. Expand the **GET** method on the Swagger UI page and select **Try it**. Select **Execute**, and the person you just created is returned.
250+
1. Expand the `GET` method on the Swagger UI page and select **Try it**. Select **Execute**, and the person you just created is returned.
253251

254252
## Deploy to Azure App Service
255253

@@ -261,13 +259,13 @@ The app is ready to be deployed to Azure. Visual Studio can create an Azure App
261259
1. For the specific target, select **Azure App Service (Windows)**, and then select **Next**.
262260
1. Select the green **+** icon to create a new App Service to deploy to and enter the following values:
263261

264-
- **Name**: Leave the default value.
265-
- **Subscription name**: Select the subscription to deploy to.
266-
- **Resource group**: Select **New** and create a new resource group called *msdocs-dotnet-sql*.
267-
- **Hosting Plan**: Select **New** to open the hosting plan dialog. Leave the default values and select **OK**.
268-
- Select **Create** to close the original dialog. Visual Studio creates the App Service resource in Azure.
269-
270-
:::image type="content" source="media/passwordless-connections/create-app-service-small.png" alt-text="Screenshot showing how to deploy with Visual Studio." lightbox="media/passwordless-connections/create-app-service.png":::
262+
- **Name**: Leave the default value.
263+
- **Subscription name**: Select the subscription to deploy to.
264+
- **Resource group**: Select **New** and create a new resource group called *msdocs-dotnet-sql*.
265+
- **Hosting Plan**: Select **New** to open the hosting plan dialog. Leave the default values and select **OK**.
266+
- Select **Create** to close the original dialog. Visual Studio creates the App Service resource in Azure.
267+
268+
:::image type="content" source="media/azure-sql-dotnet-entity-framework-core-quickstart/create-app-service-small.png" alt-text="Screenshot showing how to deploy with Visual Studio." lightbox="media/azure-sql-dotnet-entity-framework-core-quickstart/create-app-service.png":::
271269

272270
1. Once the resource is created, make sure you select in the list of app services, and then select **Next**.
273271

@@ -341,7 +339,7 @@ The Azure portal allows you to work with managed identities and run queries agai
341339
GO
342340
```
343341

344-
:::image type="content" source="media/passwordless-connections/query-editor-small.png" alt-text="Screenshot showing how to use the Azure Query editor." lightbox="media/passwordless-connections/query-editor.png":::
342+
:::image type="content" source="media/azure-sql-dotnet-entity-framework-core-quickstart/query-editor-small.png" alt-text="Screenshot showing how to use the Azure Query editor." lightbox="media/azure-sql-dotnet-entity-framework-core-quickstart/query-editor.png":::
345343

346344
This SQL script creates a SQL database user that maps back to the managed identity of your App Service instance. It also assigns the necessary SQL roles to the user to allow your app to read, write, and modify the data and schema of your database. After this step is completed, your services are connected.
347345

azure-sql/database/azure-sql-dotnet-quickstart.md

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
2-
title: Connect to and query Azure SQL Database using .NET and the Microsoft.Data.SqlClient library
2+
title: "Connect to and Query Azure SQL Database Using .NET and the Microsoft.Data.SqlClient Library"
33
description: Learn how to connect to a database in Azure SQL Database and query data using .NET
44
author: WilliamDAssafMSFT
55
ms.author: wiassaf
66
ms.reviewer: alexwolf, mathoma, vanto
7-
ms.date: 09/17/2024
7+
ms.date: 08/07/2025
88
ms.service: azure-sql-database
99
ms.subservice: security
1010
ms.topic: quickstart
11-
monikerRange: "=azuresql || =azuresql-db"
1211
ms.custom:
1312
- passwordless-dotnet
1413
- sfi-ropc-nochange
14+
monikerRange: "=azuresql || =azuresql-db"
1515
---
1616

1717
# Connect to and query Azure SQL Database using .NET and the Microsoft.Data.SqlClient library
@@ -123,8 +123,8 @@ Replace the contents of the `Program.cs` file with the following code, which per
123123

124124
- Retrieves the passwordless connection string from `appsettings.json`
125125
- Creates a `Persons` table in the database during startup (for testing scenarios only)
126-
- Creates an HTTP GET endpoint to retrieve all records stored in the `Persons` table
127-
- Creates an HTTP POST endpoint to add new records to the `Persons` table
126+
- Creates an `HTTP GET` endpoint to retrieve all records stored in the `Persons` table
127+
- Creates an `HTTP` POST endpoint to add new records to the `Persons` table
128128

129129
```csharp
130130
using Microsoft.Data.SqlClient;
@@ -226,9 +226,9 @@ The app is ready to be tested locally. Make sure you're signed in to Visual Stud
226226

227227
1) Modify the sample JSON to include values for the `first` and `last` name. Select **Execute** to add a new record to the database. The API returns a successful response.
228228

229-
:::image type="content" source="media/passwordless-connections/api-testing-small.png" alt-text="Screenshot showing how to test the API." lightbox="media/passwordless-connections/api-testing.png":::
229+
:::image type="content" source="media/azure-sql-dotnet-quickstart/api-testing-small.png" alt-text="Screenshot showing how to test the API." lightbox="media/azure-sql-dotnet-quickstart/api-testing.png":::
230230

231-
1) Expand the **GET** method on the Swagger UI page and select **Try it**. Choose **Execute**, and the person you just created is returned.
231+
1) Expand the `GET` method on the Swagger UI page and select **Try it**. Choose **Execute**, and the person you just created is returned.
232232

233233
## Deploy to Azure App Service
234234

@@ -240,18 +240,17 @@ The app is ready to be deployed to Azure. Visual Studio can create an Azure App
240240
1. For the specific target, select **Azure App Service (Windows)**, and then select **Next**.
241241
1. Select the **+** icon to create a new App Service to deploy to and enter the following values:
242242

243-
* **Name**: Leave the default value.
244-
* **Subscription name**: Select the subscription to deploy to.
245-
* **Resource group**: Select **New** and create a new resource group called *msdocs-dotnet-sql*.
246-
* **Hosting Plan**: Select **New** to open the hosting plan dialog. Leave the default values and select **OK**.
247-
* Select **Create** to close the original dialog. Visual Studio creates the App Service resource in Azure.
243+
- **Name**: Leave the default value.
244+
- **Subscription name**: Select the subscription to deploy to.
245+
- **Resource group**: Select **New** and create a new resource group called *msdocs-dotnet-sql*.
246+
- **Hosting Plan**: Select **New** to open the hosting plan dialog. Leave the default values and select **OK**.
247+
- Select **Create** to close the original dialog. Visual Studio creates the App Service resource in Azure.
248248

249-
:::image type="content" source="media/passwordless-connections/create-app-service-small.png" alt-text="Screenshot showing how to deploy with Visual Studio." lightbox="media/passwordless-connections/create-app-service.png":::
249+
:::image type="content" source="media/azure-sql-dotnet-quickstart/create-app-service-small.png" alt-text="Screenshot showing how to deploy with Visual Studio." lightbox="media/azure-sql-dotnet-quickstart/create-app-service.png":::
250250

251251
1. Once the resource is created, make sure it's selected in the list of app services, and then select **Next**.
252252
1. On the **API Management** step, select the **Skip this step** checkbox at the bottom and then choose **Finish**.
253253
1. On the Finish step, select **Close** if the dialog doesn't close automatically.
254-
255254
1. Select **Publish** in the upper right of the publishing profile summary to deploy the app to Azure.
256255

257256
When the deployment finishes, Visual Studio launches the browser to display the hosted app, but at this point the app doesn't work correctly on Azure. You still need to configure the secure connection between the App Service and the SQL database to retrieve your data.
@@ -270,19 +269,17 @@ When the deployment finishes, Visual Studio launches the browser to display the
270269

271270
## Test the deployed application
272271

273-
1) Select the **Browse** button at the top of App Service overview page to launch the root url of your app.
274-
275-
2) Append the `/swagger/index.html` path to the URL to load the same Swagger test page you used locally.
276-
277-
3) Execute test GET and POST requests to verify that the endpoints work as expected.
278-
279-
> [!TIP]
280-
> If you receive a 500 Internal Server error while testing, it might be due to your database networking configurations. Verify that your logical server is configured with the settings outlined in the [Configure the database](/azure/azure-sql/database/azure-sql-dotnet-quickstart#configure-the-database) section.
272+
1. Select the **Browse** button at the top of App Service overview page to launch the root url of your app.
273+
1. Append the `/swagger/index.html` path to the URL to load the same Swagger test page you used locally.
274+
1. Execute test `GET` and POST requests to verify that the endpoints work as expected.
281275

276+
> [!TIP]
277+
> If you receive a 500 Internal Server error while testing, it might be due to your database networking configurations. Verify that your logical server is configured with the settings outlined in the [Configure the database](/azure/azure-sql/database/azure-sql-dotnet-quickstart#configure-the-database) section.
278+
282279
Your application is now connected to Azure SQL Database in both local and hosted environments.
283280

284281
[!INCLUDE [passwordless-resource-cleanup](../includes/passwordless-resource-cleanup.md)]
285282

286283
## Related content
287284

288-
- [Quickstart: Create an Azure SQL Database single database](single-database-create-quickstart.md)
285+
- [Quickstart: Create a single database - Azure SQL Database](single-database-create-quickstart.md)

0 commit comments

Comments
 (0)