OAuth Authentication with TLS 1.2 in WPF Window Application dotnet framework 4.0

Parmar, Hariom 1 Reputation point
2022-01-07T08:09:24.49+00:00
  1. WPF Window Application dotnet framework 4.0
  2. used OAuth authentication.
  3. used Microsoft.Identity.Client Library to implement OAuth Authentication.

When we see logs on azure monitor all users sign in with Legacy TLS(TLS 1.0,1.1,3 DES).
We want to sign in with TLS 1.2
How can we Achive this?

We have successfully enabled TLS 1.2 for MVC web application user sign in with TLS 1.2

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,686 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,364 questions
XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
769 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ken Tucker 5,846 Reputation points
    2022-01-07T10:10:12.657+00:00

    .net framework 4 is not supported and does not support tls 1.2. You should look at using .net framework 4.6.2 or later instead which supports tls1.2 by default.

    if you are using .net framework 4.5 add this line of code

                      ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;   
    
    0 comments No comments