-
Notifications
You must be signed in to change notification settings - Fork 379
Description
Library version used
4.76.0
.NET version
.net 10
Scenario
Other - please specify
Is this a new or an existing app?
None
Issue description and reproduction steps
After upgrading my .net core web application from .net 8 to .net10 I get this issue when attempting to authenticate to my SQL Server database with active directory interactive.
Microsoft.Data.SqlClient.SqlException (0x80131904): macOS 15.7.1
---> System.PlatformNotSupportedException: macOS 15.7.1
at Microsoft.Identity.Client.Platforms.netstandard.NetCorePlatformProxy.StartDefaultOsBrowserAsync(String url, Boolean isBrokerConfigured)
It works fine on .net 8.
If I run dotnet nuget why [myproject] Microsoft.Identity.Client I can see that the version being used is 4.76.0 disregarding if I switch between .net 8 or .net 10.
To reproduce with a new project follow these steps on MacOS:
dotnet new console --name TestMsal -f net10.0
cd TestMsal
dotnet add package Microsoft.Data.SqlClientAdd this code in Program.cs
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
using var connection = new Microsoft.Data.SqlClient.SqlConnection("server=myserver;database=mydb;Authentication=Active Directory Interactive;Encrypt=True;TrustServerCertificate=True");
connection.Open();
using var command = new Microsoft.Data.SqlClient.SqlCommand("SELECT 1", connection);
var result = await command.ExecuteScalarAsync();
Console.WriteLine($"Query Result: {result}");
Run it:
dotnet run
I see the exception on my MacOS.
You can then switch target framework to net8.0 in your TestMsal.csproj.
Run it:
dotnet run
Authenticate and the application will succeed and we will see Query Result: 1 printed.
It should be noted that when reproducing with a complete new app the version being used (as of today) is 4.73.1 although my version in my real application where I have the issue is 4.76.0 as reported.
Exactly the same behaviour though.
I was unsure how to answer: Are you using PublicClientApplication, ConfidentialClientApplication or ManagedIdentityApplication?
Hence I left the answer as "other". I'm certainly using one of the other alternatives, not sure which though.
Relevant code snippets
Expected behavior
Expect it to work in the same way as for .net 8. A browser is opened so that I can authenticate.
Identity provider
Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)
Regression
No response
Solution and workarounds
Stay on .net 8.