-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xamarin Forms UWP freezes when using B2C + MSA #3821
Comments
You are using a version of UWP which is no longer supported. Please bump it up to use at least SDK level 10.0.17763.0. All other SDKs are deprecated. Note that this doesn't mean you won't support lower runtimes, such as Win 10.0.0.0, but the SDK must be at least 10.0.17763.0 https://www.nuget.org/packages/Microsoft.Identity.Client#dependencies-body-tab |
Better yet, don't use Xamarin, it's being deprecated by Microsoft. It is being replaced by Maui. UWP is also being retired and replaced by WinUI. With Maui, you get WinUI version by default. Here's the sample to follow: https://github.com/Azure-Samples/active-directory-xamarin-native-v2/tree/main/MAUI/MauiAppB2C |
@bgavrilMS Thank you very much for your help. Changing the min UWP version got the Local and Google accounts to work. With my B2C tenant the Microsoft account gives me the error as I posted here. Screen shots of my B2C config are also there. I have also attached the verbose logs The logs refer to WAB which I am not using. I believe this is a config issue in Azure B2C as your config works. Could you please have a look at my config to help me solve this problem. |
As far as using .Net Maui - I wish I could. I am following the .Net Maui progress closely. My problem is that the third party vendors are not quite there yet with full support. My app is 80% complete and uses Prism and a lot of the Syncfusion components. I will re-asses this in a years time and make the switch then. |
The SDK itself is not responsible for the content that gets displayed in the browser - that content comes from the service (the identity provider, in this case B2C). The browser is a UWP control called WAB (win auth broker - this is not the same as WAM - win auth manager). WAB is very sensitive to HTML content it has to navigate to, and will bail on any sign of a problem (e.g. a picture is linked via HTTP instead of HTTPS). I will ping the b2c folks, but I suggest you open a ticket via Azure Portal yourself about this. Realistically, I cannot tell you if this is going to be fixed or not. UWP is on its way out and B2C is also being redesigned to become a part of normal AAD. |
Thanks very much for your insights, as it makes design decisions easier. Is it possible to only use Local login for UWP only and Local, Google and MS for Android and iOS? This way I can side step the problem for now or use Local login only for all three platforms. I really appreciate your help, the joys of software engineering :) |
Yeah, app models with strict constraints like UPW are hard to work with. I am not aware of any way to configure B2C to show some providers on mobile and other providers on UWP. |
Won't follow up on UWP issues, please use WinUI or raise the issue via Azure Portal for B2C |
Which version of MSAL.NET are you using?
Version: 4.48.1
Platform
Xamarin Forms UWP
What authentication flow has the issue?
Expected behavior
Login dialog appears.
Actual behavior
Exception thrown.
Hi,
I have followed the sample app configuration and code from here,
This app sample works for Local, MS and Google Accounts. Unfortunately most packages in this sample are very old. I have created a new sample project, that is attached, with the latest Nuget Packages. I am faced with the error:
Microsoft.Identity.Client.MsalClientException: Only loopback redirect uri is supported, but msale5737214-6372-472c-a85a-68e8fbe6cf3c://auth/ was found.
Attached is the full verbose stack trace, logs and the sample app.
Can you please help me solve this problem?
To view my B2C configuration please look here. This issue contains images of my B2C setup.
UWP Stack Trace.log
Msal.zip
Thanks
Mark and Zac.
The text was updated successfully, but these errors were encountered: