@Srini Babu Maroju
Thank you for your post and I apologize for the delayed response!
For your error message, it looks like there's an issue opening your default browser? Have you had the chance to look through our MSAL.NET - How to use the Default OS Browser documentation?
MSAL.NET needs to listen on http://localhost:port and intercept the code that AAD sends when the user is done authenticating (See Authorization code for details)To enable the system browser:
During app registration, configure http://localhost as a redirect uri (not currently supported by B2C)
When you construct your PublicClientApplication, specify this redirect uri:
IPublicClientApplication pca = PublicClientApplicationBuilder .Create("<CLIENT_ID>") // or use a known port if you wish "http://localhost:1234" .WithRedirectUri("http://localhost") .Build();
If you configure http://localhost, internally MSAL.NET will find a random open port and use it.
If you have any other questions, please let me know.
Thank you for your time and patience throughout this issue.
Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.