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
title: "Authenticating .NET Framework applications (Microsoft Dataverse) | Microsoft Docs"# Intent and product brand in a unique string of 43-59 chars including spaces
2
+
title: "Authenticating .NET applications (Microsoft Dataverse) | Microsoft Docs"# Intent and product brand in a unique string of 43-59 chars including spaces
3
3
description: "Provides an overview of .NET based application authentication with Microsoft Dataverse web services."# 115-145 characters including spaces. This abstract displays in the search result.
4
4
ms.custom: ""
5
-
ms.date: 03/23/2021
5
+
ms.date: 01/06/2022
6
6
ms.reviewer: "pehecke"
7
7
ms.service: powerapps
8
8
ms.topic: "article"
@@ -17,14 +17,15 @@ search.app:
17
17
- D365CE
18
18
---
19
19
20
-
# Authenticating .NET Framework applications
20
+
# Authenticating .NET applications
21
21
22
-
If you are using the .NET Framework when developing your application you can use classes within the [Xrm.Tooling](/dotnet/api/?view=dynamics-xrmtooling-ce-9) namespace to easily authenticate and connect to the Microsoft Dataverse web services.
22
+
This topic provides guidance when developing applications coded and built using .NET.
23
23
24
-
`Xrm.Tooling` classes in the SDK assemblies use the <xref:Microsoft.Xrm.Sdk.IOrganizationService> interface methods. This is the same style of programming used by plug-ins and workflow activities, making it one style that you can use everywhere for .NET Framework applications. We recommend using the <xref:Microsoft.Xrm.Tooling.Connector>.<xref:Microsoft.Xrm.Tooling.Connector.CrmServiceClient> class for web service connection.
24
+
## .NET Framework applications
25
+
26
+
If you are using the .NET Framework when developing your application you can use classes within the [Xrm.Tooling](/dotnet/api/) namespace to easily authenticate and connect to the Microsoft Dataverse web services.
25
27
26
-
> [!NOTE]
27
-
> You may find older code or samples using the low-level <xref:Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy> or <xref:Microsoft.Xrm.Sdk.WebServiceClient.OrganizationWebProxyClient> classes. These remain supported and are not deprecated, but we recommend you use <xref:Microsoft.Xrm.Tooling.Connector.CrmServiceClient> for new .NET Framework client Applications.
28
+
`Xrm.Tooling` classes in the SDK assemblies use the <xref:Microsoft.Xrm.Sdk.IOrganizationService> interface methods. This is the same style of programming used by plug-ins and workflow activities, making it one style that you can use everywhere for .NET Framework applications. We recommend using the <xref:Microsoft.Xrm.Tooling.Connector>.<xref:Microsoft.Xrm.Tooling.Connector.CrmServiceClient> class for web service connection.
28
29
29
30
The `Xrm.Tooling` classes provide many benefits including:
30
31
- You can define connection information using a connection string.
@@ -42,29 +43,26 @@ If you want to use the Web API, you can use the <xref:Microsoft.Xrm.Tooling.Conn
42
43
More information: [Build Windows client applications using the XRM tools](xrm-tooling/build-windows-client-applications-xrm-tools.md)
43
44
44
45
45
-
## .NET Framework versions
46
+
###.NET Framework versions
46
47
47
-
Use .NET Framework version 4.6.2 or higher when you create client applications. Only applications using Transport Level Security (TLS) 1.2 or better security can connect. TLS 1.2 is not the default protocol used by .NET Framework 4.5.2, but it is in .NET Framework 4.6.2.
48
+
Use .NET Framework version 4.6.2 or higher when you create client applications. Only applications using Transport Level Security (TLS) 1.2 or better security can connect. TLS 1.2 is not the default protocol used by .NET Framework 4.5.2, but it is in .NET Framework 4.6.2 or later.
48
49
49
-
> [!IMPORTANT]
50
-
> The SDK APIs available in [Microsoft.CrmSdk.XrmTooling.CoreAssembly](https://www.nuget.org/packages/Microsoft.CrmSdk.XrmTooling.CoreAssembly/) and other "CrmSdk" NuGet packages do not support .NET Core code development.<p/>
51
-
> **Known Issue with Visual Studio 2015**
52
-
>
53
-
> When you are running your Visual Studio 2015 project/solution in debug mode, you may not be able to connect. This happens regardless of whether you are using a Target Framework of 4.6.2 or higher. This can occur because the Visual Studio hosting process is compiled against .NET 4.5 which means by default it does not support TLS 1.2. You can disable the Visual Studio hosting process as a work around.
54
-
>
55
-
> Right-click on the name of your project in Visual Studio and then click **Properties**. On the **Debug** tab you can uncheck the **Enable the Visual Studio hosting process** option.
56
-
>
57
-
> This only impacts the debug experience in VS 2015. This does not impact the binaries or executable that are built. The same issue does not occur in Visual Studio 2017.
58
-
59
-
## .NET Framework applications without SDK assemblies
50
+
### .NET Framework applications without using SDK assemblies
60
51
61
52
If you prefer to not have a dependency on any SDK assemblies, you can also use the patterns described in [Use OAuth with Microsoft Dataverse](authenticate-oauth.md) without taking a dependency on any SDK assemblies. Without the SDK assemblies, you can only use the OData Restful web services (Web API and OData Global Discovery Service). The [Web API Data operations Samples (C#)](webapi/web-api-samples-csharp.md) demonstrate this approach.
62
53
54
+
## .NET Core and .NET 6 applications
55
+
56
+
The SDK APIs available in [Microsoft.CrmSdk.XrmTooling.CoreAssembly](https://www.nuget.org/packages/Microsoft.CrmSdk.XrmTooling.CoreAssembly/) and other "crmsdk" owned NuGet packages do not support .NET Core code development.
57
+
58
+
For .NET Core application development there is a `DataverseServiceClient` class, currently in preview release, that is patterned after the `CrmServiceClient` class mentioned previously. You can download the [Microsoft.PowerPlatform.Dataverse.Client](https://www.nuget.org/packages/Microsoft.PowerPlatform.Dataverse.Client/) package from Nuget.org to begin using this new service client class in your applications. Documentation and sample code for the `DataverseServiceClient` and related classes will be made available in a future documentation release.
59
+
60
+
To update existing .NET Framework based application code that uses `CrmServiceClient`, begin by substituting the `DataverseServiceClient` class for `CrmServiceClient` in your code. You will need to set the project type to build a .NET Core application, remove any .NET Framework specific references and NuGet packages, and then add the Microsoft.PowerPlatform.Dataverse.Client package to the project.
61
+
63
62
### See also
64
63
65
64
[Authentication with Dataverse web services](authentication.md)<br />
Copy file name to clipboardExpand all lines: powerapps-docs/developer/data-platform/authenticate-office365-deprecation.md
+14-15Lines changed: 14 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
---
2
-
title: "Use Office365 authentication with Microsoft Dataverse (Microsoft Dataverse) | Microsoft Docs"# Intent and product brand in a unique string of 43-59 chars including spaces
2
+
title: "Use of Office365 authentication with Microsoft Dataverse (Microsoft Dataverse) | Microsoft Docs"# Intent and product brand in a unique string of 43-59 chars including spaces
3
3
description: "Describes deprecation of the WS-Trust security protocol and the code changes required in applications that use Office365 authentication."
4
4
ms.custom: ""
5
-
ms.date: 09/20/2021
5
+
ms.date: 01/06/2022
6
6
ms.reviewer: "pehecke"
7
7
ms.service: powerapps
8
8
ms.topic: "article"
@@ -17,18 +17,17 @@ search.app:
17
17
- D365CE
18
18
---
19
19
20
-
# Use Office365 authentication with Microsoft Dataverse
20
+
# Use of Office365 authentication with Microsoft Dataverse
21
21
22
-
Use of the WS-Trust authentication security protocol when connecting to Microsoft Dataverse is no longer recommended and has been deprecated; see the [announcement](/power-platform/important-changes-coming#deprecation-of-office365-authentication-type-and-organizationserviceproxy-class-for-connecting-to-dataverse).
23
-
24
-
Additionally, the WS-Trust protocol does not support modern forms of multi-factor authentication and Azure AD Conditional Access controls to customer data.
22
+
> [!IMPORTANT]
23
+
> Use of the WS-Trust (Office365) authentication security protocol when connecting to Microsoft Dataverse is no longer recommended and has been deprecated; see the [announcement](/power-platform/important-changes-coming#deprecation-of-office365-authentication-type-and-organizationserviceproxy-class-for-connecting-to-dataverse).<p/>
24
+
> Additionally, the WS-Trust protocol does not support modern forms of multi-factor authentication and Azure AD Conditional Access controls to customer data.
25
25
26
-
This change impacts custom client applications that use “Office365” authentication and the
26
+
This document describes the impact to and required authentication code changes for custom client applications that use “Office365” authentication and the
27
27
[Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy](/dotnet/api/microsoft.xrm.sdk.client.organizationserviceproxy) or
Wheninvokingtheconstructor, itisrecommendyouaddtheNuGetpackage [Microsoft.CrmSdk.XrmTooling.CoreAssembly](https://www.nuget.org/packages/Microsoft.CrmSdk.XrmTooling.CoreAssembly/) to your project and replace all use of `OrganizationServiceProxy` class constructors with [CrmServiceClient](/dotnet/api/microsoft.xrm.tooling.connector.crmserviceclient) class constructors. You will need to alter your coding pattern here, however, for simplicity `CrmServiceClient` supports connection strings in addition to complex constructors and the ability to provide external authentication handlers. `CrmServiceClient` implements `IOrganizationService`, therefore your new authentication code will be portable to the rest of your application code. You can find examples on the use of `CrmServiceClient` in the [PowerApps-Samples](https://github.com/microsoft/PowerApps-Samples/tree/master/cds/orgsvc/C%23) repository.
67
66
@@ -71,7 +70,7 @@ the recommended connection interface for authentication with Dataverse.
@@ -85,15 +84,15 @@ the recommended connection interface for authentication with Dataverse.
85
84
86
85
TheAppIdandRedirectUriprovidedaboveareexamplesofworkingapplicationregistrationvalues. Thesevaluesworkeverywhereouronlineservicesaredeployed. However, theyareprovidedhereasexamplesandyouareencouragedto [createyourownapplicationregistration](walkthrough-register-app-azure-active-directory.md) inAzureActiveDirectory (AzureAD) for applications running in your tenant. Use your Username, Password, and Dataverse environment URL values in the connection string along with the RedirectUri and AppId you obtain from your Azure app registration.<p/>
87
86
88
-
- When we announce it, update to the latest [Microsoft.CrmSdk.XrmTooling.CoreAssembly](https://www.nuget.org/packages/Microsoft.CrmSdk.XrmTooling.CoreAssembly/) NuGet package that includes auto redirect support. This library will redirect an authentication type of Office365 to OAuth and use the example AppId and Redirect URI automatically. This capability is planned for the 9.2.x version of the Microsoft.CrmSdk.XrmTooling.CoreAssembly package.
87
+
- When we announce it, update to the latest [Microsoft.CrmSdk.XrmTooling.CoreAssembly](https://www.nuget.org/packages/Microsoft.CrmSdk.XrmTooling.CoreAssembly/) NuGet package that includes auto redirect support. This library will redirect an authentication type of "Office365" to "OAuth" and use the example AppId and Redirect URI automatically. This capability is planned for the 9.2.x version of the Microsoft.CrmSdk.XrmTooling.CoreAssembly package.
89
88
90
89
- If you are accessing the [CrmServiceClient](/dotnet/api/microsoft.xrm.tooling.connector.crmserviceclient).`OrganizationServiceProxy` property:
Copy file name to clipboardExpand all lines: powerapps-docs/developer/data-platform/authentication.md
+9-7Lines changed: 9 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: "Authenticate with Microsoft Dataverse web services (Dataverse) | Microsoft Docs"# Intent and product brand in a unique string of 43-59 chars including spaces
3
3
description: "Introduces authentication options that depend on the software framework you use."# 115-145 characters including spaces. This abstract displays in the search result.
4
4
ms.custom: ""
5
-
ms.date: 03/23/2021
5
+
ms.date: 01/06/2022
6
6
ms.reviewer: "pehecke"
7
7
ms.service: powerapps
8
8
ms.topic: "article"
@@ -23,9 +23,9 @@ How you authenticate depends on the software framework you use and which web ser
23
23
24
24
## .NET Framework applications
25
25
26
-
If your client application uses the .NET Framework, you have two options:
26
+
If your client application uses the .NET Framework, you have two authentication options:
27
27
28
-
- OAuth
28
+
- OAuth (recommended)
29
29
- Microsoft 365
30
30
31
31
### OAuth
@@ -41,16 +41,18 @@ More information: [Use OAuth with Dataverse](authenticate-oauth.md)
41
41
42
42
### Microsoft 365
43
43
44
-
Microsoft 365 authentication requires using the .NET Framework SDK assemblies with the SOAP web services only.
44
+
Microsoft 365 authentication (referred to as Office365 in code) requires using the .NET Framework SDK assemblies with the SOAP web services only.
45
45
46
46
Using Microsoft 365 authentication does not require that your register your applications as OAuth does. You must simply provide a User Principal Name (UPN) and password for a valid user.
47
47
48
-
More information: [Authentication with .NET Framework applications](authenticate-dot-net-framework.md), [Use of Microsoft 365 authentication with the WS-Trust security protocol](authenticate-office365-deprecation.md)
48
+
More information: [Authentication with .NET Framework applications](authenticate-dot-net-framework.md)
49
+
50
+
> [!IMPORTANT]
51
+
> Microsoft 365 authentication for Dataverse is deprecated. More information: [Use of Office365 authentication with Microsoft Dataverse](authenticate-office365-deprecation.md)
49
52
50
53
## All other software frameworks
51
54
52
-
If you are using anything other than .NET Framework, you must authenticate using OAuth and you must use the OData RESTful
53
-
web services (Web API and OData global Discovery service).
55
+
If you are using anything other than .NET Framework, you must authenticate using OAuth and you must use the OData RESTful web services (Web API and OData global Discovery service).
54
56
55
57
More information: [Use OAuth with Dataverse](authenticate-oauth.md)
0 commit comments