Reputation: 361
I am using .NET MAUI using Visual studio for Mac v17.6.10(build 428) with .net8 preview version and Microsoft.Identity.Client for maccatalyst. It throws exception as
**System.PlatformNotSupportedException: Darwin 23.1.0 Darwin Kernel Version 23.1.0**
the details stack trace as follows
**Microsoft.Identity.Client.Platforms.netcore.NetCorePlatformProxy.StartDefaultOsBrowserAsync(String url, Boolean isBrokerConfigured)\n at Microsoft.Identity.Client.Platforms.Shared.Desktop.OsBrowser.DefaultOsBrowserWebUi.<>c__DisplayClass10_0**
The code as below
var applicationOptions = new PublicClientApplicationOptions
{
ClientId = AuthenticationConfig.ApplicationID,
RedirectUri = "http://localhost/",
};
var PublicClient = PublicClientApplicationBuilder
.CreateWithApplicationOptions(applicationOptions)
.WithKerberosTicketClaim(UserEmailID, new MicrosoftIdentityClient.Kerberos.KerberosTicketContainer())
.Build();
AuthenticationResultObj = await PublicClient.AcquireTokenInteractive((IEnumerable<string>)AuthenticationConfig.Scopes)
.WithPrompt(MicrosoftIdentityClient.Prompt.Consent)
.WithLoginHint(UserEmailID)
.ExecuteAsync();
according to exception Microsoft.Identity.Client library I am using isn't compatible with the macOS version (Darwin kernel 23.1.0) or macOS Sonoma 14.1
Please suggest any changes required in code or project configuration.
Thanks in advance
Upvotes: 0
Views: 154