Skip to content

Commit 02c8df0

Browse files
committed
docs: Migrate System.Data.SqlClient to Microsoft.Data.SqlClient (Batch 5)
1 parent 7b1e9ae commit 02c8df0

4 files changed

Lines changed: 51 additions & 45 deletions

File tree

azure-sql/database/authentication-aad-service-principal-tutorial.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: This tutorial walks you through creating Microsoft Entra users with
44
author: VanMSFT
55
ms.author: vanto
66
ms.reviewer: wiassaf, mathoma
7-
ms.date: 09/18/2025
7+
ms.date: 03/18/2026
88
ms.service: azure-sql-database
99
ms.subservice: security
1010
ms.topic: tutorial
@@ -19,11 +19,11 @@ ms.custom:
1919

2020
[!INCLUDE [appliesto-sqldb](../includes/appliesto-sqldb.md)]
2121

22-
This article explains how to configure a service principal so it can create Microsoft Entra users in Azure SQL Database. This capability enables programmatic configuration of access management to Azure SQL resources for users and applications in your Microsoft Entra tenant.
22+
This article explains how to configure a service principal so it can create Microsoft Entra users in Azure SQL Database. This capability lets you programmatically manage access to Azure SQL resources for users and applications in your Microsoft Entra tenant.
2323

2424
[!INCLUDE [entra-id](../includes/entra-id.md)]
2525

26-
For more information on Microsoft Entra authentication for Azure SQL, see the article [Use Microsoft Entra authentication](authentication-aad-overview.md).
26+
For more information on Microsoft Entra authentication for Azure SQL, see [Use Microsoft Entra authentication](authentication-aad-overview.md).
2727

2828
In this tutorial, you learn how to:
2929

@@ -36,7 +36,7 @@ In this tutorial, you learn how to:
3636
3737
## Prerequisites
3838

39-
- An existing [Azure SQL Database](single-database-create-quickstart.md) deployment. We assume you have a working SQL Database for this tutorial.
39+
- An existing [Azure SQL Database](single-database-create-quickstart.md) deployment. This tutorial assumes you have a working SQL Database.
4040
- Microsoft Entra `Privileged Role Administrator` permissions in the tenant where your SQL database resides.
4141
- The latest version of the [Az.Sql](https://www.powershellgallery.com/packages/Az.Sql/) PowerShell module.
4242
- The latest version of the [Microsoft.Graph](https://www.powershellgallery.com/packages/Microsoft.Graph) PowerShell module.
@@ -70,7 +70,7 @@ In this tutorial, you learn how to:
7070
$xyz.identity
7171
```
7272

73-
Your output should show you `PrincipalId`, `Type`, and `TenantId`. The identity assigned is the `PrincipalId`.
73+
Your output shows `PrincipalId`, `Type`, and `TenantId`. The identity assigned is the `PrincipalId`.
7474

7575
1. You can also check the identity by going to the [Azure portal](https://portal.azure.com).
7676

@@ -190,7 +190,7 @@ Connect to your SQL Database using a Microsoft Entra identity that has permissio
190190
GO
191191
```
192192

193-
1. In order to create other Microsoft Entra users, at minimum, the `ALTER ANY USER` SQL permission is required. This permission is also inherited through membership in `db_owner`, and through assignment as the Microsoft Entra admin. The following examples demonstrate three different options to assign permissions to *DBOwnerApp* that allow it to create other Microsoft Entra users in the database.
193+
1. To create other Microsoft Entra users, at minimum, the `ALTER ANY USER` SQL permission is required. This permission is also inherited through membership in `db_owner`, and through assignment as the Microsoft Entra admin. The following examples demonstrate three different options to assign permissions to *DBOwnerApp* that allow it to create other Microsoft Entra users in the database.
194194

195195
You can add *DBOwnerApp* to the `db_owner` role with [sp_addrolemember](/sql/relational-databases/system-stored-procedures/sp-addrolemember-transact-sql):
196196

@@ -206,7 +206,7 @@ Connect to your SQL Database using a Microsoft Entra identity that has permissio
206206
GO
207207
```
208208

209-
You can set the *DBOwnerApp* as the Microsoft Entra admin. This can be done using the Azure portal, PowerShell, or Azure CLI commands. For more information, see [Set Microsoft Entra admin](authentication-aad-configure.md#azure-sql-database-and-azure-synapse-analytics).
209+
You can set the *DBOwnerApp* as the Microsoft Entra admin. Use the Azure portal, PowerShell, or Azure CLI commands. For more information, see [Set Microsoft Entra admin](authentication-aad-configure.md#azure-sql-database-and-azure-synapse-analytics).
210210

211211
<a id="create-an-azure-ad-user-in-sql-database-using-an-azure-ad-service-principal"></a>
212212

@@ -220,6 +220,9 @@ Connect to your SQL Database using a Microsoft Entra identity that has permissio
220220
- Replace `<ServerName>` with your logical server name. If your server name is `myserver.database.windows.net`, replace `<ServerName>` with `myserver`.
221221
- Replace `<database name>` with your SQL Database name.
222222

223+
> [!NOTE]
224+
> The following script requires the **Microsoft.Data.SqlClient** assembly. Install it from the [NuGet package](https://www.nuget.org/packages/Microsoft.Data.SqlClient) and load the DLL with `Add-Type -Path "path\to\Microsoft.Data.SqlClient.dll"` before running the script.
225+
223226
```powershell
224227
# PowerShell script for creating a new SQL user called myapp using application DBOwnerApp with secret
225228
# DBOwnerApp is an admin for the server
@@ -242,7 +245,7 @@ Connect to your SQL Database using a Microsoft Entra identity that has permissio
242245
$DatabaseName = "<database name>" # Azure SQL database name
243246
244247
Write-Host "Create SQL connection string"
245-
$conn = New-Object System.Data.SqlClient.SQLConnection
248+
$conn = New-Object Microsoft.Data.SqlClient.SqlConnection
246249
$conn.ConnectionString = "Data Source=$SQLServerName.database.windows.net;Initial Catalog=$DatabaseName;Connect Timeout=30"
247250
$conn.AccessToken = $Tok
248251
@@ -252,14 +255,14 @@ Connect to your SQL Database using a Microsoft Entra identity that has permissio
252255
Write-host " "
253256
Write-host "SQL DDL command"
254257
$ddlstmt
255-
$command = New-Object -TypeName System.Data.SqlClient.SqlCommand($ddlstmt, $conn)
258+
$command = New-Object -TypeName Microsoft.Data.SqlClient.SqlCommand($ddlstmt, $conn)
256259
257260
Write-host "results"
258261
$command.ExecuteNonQuery()
259262
$conn.Close()
260263
```
261264

262-
Alternatively, you can use the following code: [Microsoft Entra service principal authentication to Azure SQL Database](https://techcommunity.microsoft.com/t5/azure-sql-database/azure-ad-service-principal-authentication-to-sql-db-code-sample/ba-p/481467). Modify the script to execute the DDL statement `CREATE USER [myapp] FROM EXTERNAL PROVIDER`. The same script can be used to create a Microsoft Entra user or group in your database.
265+
Alternatively, you can use the following code: [Microsoft Entra service principal authentication to Azure SQL Database](https://techcommunity.microsoft.com/t5/azure-sql-database/azure-ad-service-principal-authentication-to-sql-db-code-sample/ba-p/481467). Modify the script to execute the DDL statement `CREATE USER [myapp] FROM EXTERNAL PROVIDER`. Use the same script to create a Microsoft Entra user or group in your database.
263266

264267
1. Check if the user *myapp* exists in the database by executing the following command:
265268

docs/master-data-services/develop/create-a-custom-workflow-example.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Create a Custom Workflow - Example
44
author: meetdeepak
55
ms.author: dkhare
66
ms.reviewer: mikeray
7-
ms.date: 03/05/2026
7+
ms.date: 03/18/2026
88
ms.service: sql
99
ms.subservice: master-data-services
1010
ms.topic: reference
@@ -19,16 +19,16 @@ ms.custom:
1919

2020
In [!INCLUDE[ssMDSshort](../../includes/ssmdsshort-md.md)], when you create a custom workflow class library, you create a class that implements the Microsoft.MasterDataServices.WorkflowTypeExtender.IWorkflowTypeExtender interface. This interface includes one method, [Microsoft.MasterDataServices.WorkflowTypeExtender.IWorkflowTypeExtender.StartWorkflow*](/previous-versions/sql/sql-server-2016/hh759009(v=sql.130)) , that is called by SQL Server MDS Workflow Integration Service when a workflow starts. The [Microsoft.MasterDataServices.WorkflowTypeExtender.IWorkflowTypeExtender.StartWorkflow*](/previous-versions/sql/sql-server-2016/hh759009(v=sql.130)) method contains two parameters: *workflowType* contains the text you entered in the **Workflow type** text box in [!INCLUDE[ssMDSmdm](../../includes/ssmdsmdm-md.md)], and *dataElement* contains metadata and item data for the item that triggered the workflow business rule.
2121

22-
## Custom Workflow Example
23-
The following code example shows how you how to implement the [Microsoft.MasterDataServices.WorkflowTypeExtender.IWorkflowTypeExtender.StartWorkflow*](/previous-versions/sql/sql-server-2016/hh759009(v=sql.130)) method to extract the Name, Code, and LastChgUserName attributes from the XML data for the element that triggered the workflow business rule, and how to call a stored procedure to insert them into another database. For an example of the item data XML and an explanation of the tags it contains, see [Custom Workflow XML Description &#40;Master Data Services&#41;](../../master-data-services/develop/create-a-custom-workflow-xml-description.md).
22+
## Custom workflow example
23+
The following code example shows how to implement the [Microsoft.MasterDataServices.WorkflowTypeExtender.IWorkflowTypeExtender.StartWorkflow*](/previous-versions/sql/sql-server-2016/hh759009(v=sql.130)) method to extract the Name, Code, and LastChgUserName attributes from the XML data for the element that triggered the workflow business rule, and how to call a stored procedure to insert them into another database. For an example of the item data XML and an explanation of the tags it contains, see [Custom Workflow XML Description &#40;Master Data Services&#41;](../../master-data-services/develop/create-a-custom-workflow-xml-description.md).
2424

2525
```csharp
2626
using System;
2727
using System.Collections.Generic;
2828
using System.Linq;
2929
using System.Text;
3030
using System.IO;
31-
using System.Data.SqlClient;
31+
using Microsoft.Data.SqlClient;
3232
using System.Xml;
3333

3434
using Microsoft.MasterDataServices.Core.Workflow;
@@ -67,5 +67,6 @@ namespace MDSWorkflowTestLib
6767
}
6868
```
6969

70-
## See Also
71-
[Create a Custom Workflow &#40;Master Data Services&#41;](../../master-data-services/develop/create-a-custom-workflow-master-data-services.md)
70+
## Related content
71+
72+
- [Create a Custom Workflow &#40;Master Data Services&#41;](../../master-data-services/develop/create-a-custom-workflow-master-data-services.md)

docs/reporting-services/application-integration/using-the-webforms-reportviewer-control.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Use WebForms ReportViewer control"
33
description: To view reports deployed to a report server or on a local file system, you can use the WebForms ReportViewer control to render them in a Web application.
4-
ms.date: 09/25/2024
4+
ms.date: 03/18/2026
55
ms.service: reporting-services
66
ms.subservice: application-integration
77
ms.topic: reference
@@ -11,11 +11,12 @@ helpviewer_keywords:
1111
- "ReportViewer controls"
1212
---
1313
# Use the WebForms ReportViewer control
14-
To view reports deployed to a report server or reports that exist on the local file system, you can use the WebForms ReportViewer control to render them in a Web application.
14+
15+
The WebForms ReportViewer control renders reports deployed to a report server or stored on the local file system in a Web application.
1516

1617
## Use the ReportViewer control in a Web application
1718

18-
1. Create a new [!INCLUDE[msCoName](../../includes/msconame-md.md)] ASP.NET Web Site using either [!INCLUDE[msCoName](../../includes/msconame-md.md)] [!INCLUDE[c-sharp](../../includes/c-sharp-md.md)] or [!INCLUDE[msCoName](../../includes/msconame-md.md)] [!INCLUDE[visual-basic](../../includes/visual-basic-md.md)].
19+
1. Create a new [!INCLUDE[msCoName](../../includes/msconame-md.md)] ASP.NET Web Site by using either [!INCLUDE[msCoName](../../includes/msconame-md.md)] [!INCLUDE[c-sharp](../../includes/c-sharp-md.md)] or [!INCLUDE[msCoName](../../includes/msconame-md.md)] [!INCLUDE[visual-basic](../../includes/visual-basic-md.md)].
1920

2021
\- Or -
2122

@@ -29,11 +30,11 @@ helpviewer_keywords:
2930

3031
The **ReportViewer** control named reportViewer1 is added to the form.
3132

32-
After the control is added to the form, the **ReportViewer Tasks** smart tag appears, prompting you to select a report. If the report you wish to view is deployed to a report server, select the **\<Server Report>** option from the **Choose Report** drop-down list. Once the **\<Server Report>** option is selected two more properties appear, **Report Server Url** and **Report Path**. The **Report Server Url** is the address to the report server and the **Report Path** is the full path to the report you want to render.
33+
After you add the control to the form, the **ReportViewer Tasks** smart tag appears and prompts you to select a report. If the report you want to view is deployed to a report server, select the **\<Server Report>** option from the **Choose Report** drop-down list. After you select the **\<Server Report>** option, two more properties appear: **Report Server Url** and **Report Path**. The **Report Server Url** is the address to the report server, and the **Report Path** is the full path to the report you want to render.
3334

34-
If you want to view a report in local mode, select either the **Design a new report** option to launch the report designer or select a report that is already part of the existing project. After you select a report, be sure to enter the name of the report RDLC file in the **ReportPath** property of the ReportViewer control. This property appears under the **LocalReport** node in the **Properties** pane.
35+
If you want to view a report in local mode, select either the **Design a new report** option to launch the report designer or select a report that's already part of the existing project. After you select a report, enter the name of the report RDLC file in the **ReportPath** property of the ReportViewer control. This property appears under the **LocalReport** node in the **Properties** pane.
3536

36-
You have the option of hiding one or more of the items on the ReportViewer toolbar when the report is rendered. For example, you can hide the print button. To hide toolbar items, set the following ReportViewer properties to **False** in the **Properties** pane.
37+
You can hide one or more items on the ReportViewer toolbar when you render the report. For example, to hide the print button, set the following ReportViewer properties to **False** in the **Properties** pane.
3738

3839
- **ShowBackButton**
3940

@@ -50,9 +51,9 @@ helpviewer_keywords:
5051
- **ShowZoomControl**
5152

5253
## View reports in remote processing mode
53-
The following example demonstrates how to render a report that is deployed to a report server. This example uses the Sales Order Detail report that is included with the [!INCLUDE[ssSampleDBobject](../../includes/sssampledbobject-md.md)] sample reports project.
54+
The following example demonstrates how to render a report deployed to a report server. This example uses the Sales Order Detail report included with the [!INCLUDE[ssSampleDBobject](../../includes/sssampledbobject-md.md)] sample reports project.
5455

55-
The example uses integrated Windows Authentication so you first must enable impersonation. To do this insert the following line into the **web.config** file:
56+
The example uses integrated Windows Authentication, so you must first enable impersonation. To enable it, insert the following line into the **web.config** file:
5657

5758
```
5859
<!-- Web.config file. -->
@@ -132,11 +133,11 @@ End Class
132133
```
133134

134135
## View reports in local processing mode
135-
The following example demonstrates how to render a report that is part of the Windows application and isn't deployed to a report server.
136+
The following example demonstrates how to render a report that's part of the Windows application and isn't deployed to a report server.
136137

137138
###### To add the Sales Order Detail report to a Web site
138139

139-
1. Open the Web Site that the report will be added to.
140+
1. Open the Web Site where you want to add the report.
140141

141142
2. From the **Website** menu, select **Add Existing Item**.
142143

@@ -146,11 +147,11 @@ End Class
146147

147148
4. Select the Sales Order Detail.rdl file and select the **Add** button.
148149

149-
The Sales Order Detail.rdl file should now be part of the project.
150+
The Sales Order Detail.rdl file is now part of the project.
150151

151152
5. Right-click the Sales Order Detail.rdl file in Solution Explorer and select **Rename**. Rename the report to **Sales Order Detail.rdlc** and press ENTER.
152153

153-
If Solution Explorer isn't visible, you can open it from the **View** menu by selecting Solution Explorer.
154+
If Solution Explorer isn't visible, you can open it from the **View** menu by selecting **Solution Explorer**.
154155

155156
The following code example creates a dataset for the sales order data and then renders the Sales Order Detail report in local mode.
156157

@@ -305,7 +306,7 @@ private void GetSalesOrderDetailData(string salesOrderNumber,
305306
**VB.NET**
306307
```vb
307308
Imports System.Data
308-
Imports System.Data.SqlClient
309+
Imports Microsoft.Data.SqlClient
309310
Imports Microsoft.Reporting.WebForms
310311

311312
Partial Class _Default

0 commit comments

Comments
 (0)