MSAL in .NET 4.8 framework getting null reference error during running embedded browser

Dilip kumar 0 Reputation points
2024-07-08T07:26:51.9333333+00:00

I am getting this error in MSAL library for .net for publicclient application Capture

microsoft.identity.client version 4.60.3.0

microsoft.identityModel.abstraction. 6.35.0.41

I have entered authenticator code 2 digits number in embedded browser 3 to 4 times again and again then this issue is raising

Microsoft Authenticator
Microsoft Authenticator
A Microsoft app for iOS and Android devices that enables authentication with two-factor verification, phone sign-in, and code generation.
6,014 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,312 questions
Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,751 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,442 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2024-07-08T07:26:51.9733333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The error you are seeing in MSAL.NET for .NET 4.8 framework with an embedded browser may be related to a bug in the WebView2 SDK on the .NET Framework platform. One workaround is to add a <PlatformTarget> with values AnyCPU, x86, or x64 to your application project file. x86 or x64 have to match the target framework of the WebView2 installed on the machine. Another workaround is to add <PlatformTarget>AnyCPU</PlatformTarget> in your app's project file and also directly reference the WebView2 NuGet package. For more information, see Using WebView2 with MSAL.NET.


    References:

    0 comments No comments