Xamarin MSAL Azure AD ADFS AcquireTokenInteractive error

hernandoZ 26 Reputation points
2023-09-18T17:06:38.9333333+00:00

Hi I just seen this error in our app ,

ERROR

Web page not Available

The web page at https://adfs.srm.com/adfs/ls/wia?client-request-id=##########

Could not be loaded because : net::ERR_HTTP_RESPONSE_CODE_FAILURE

Screenshot 2023-09-18 174103

Normally the user enter their email account, then it gets taken to another "Taking you to your organisation's sign-in page" then screen to enter the password .

Screenshot 2023-09-19 071400

Since 2 weeks ago they get the error (1st image), after the "Taking you to your organisation's sign-in page" is loading . As far as I know this was working 2 or 3 weeks ago.

I cannot find any information regarding this error , any ideas ?

Authentication method



var builder = PublicClientApplicationBuilder.Create(AppConstants.AadClientId)
.WithIosKeychainSecurityGroup(AppConstants.AppId)
.WithRedirectUri(RedirectUri)
.WithLogging(Log, LogLevel.Verbose, enablePiiLogging: true, enableDefaultPlatformLogging: false)
.WithAuthority(AzureCloudInstance.AzurePublic , AppConstants.TenantId);
try
{
    var accounts = await _pca.GetAccountsAsync();
    var firstAccount = accounts.FirstOrDefault();
    var authResult = await _pca.AcquireTokenSilent(Scopes, firstAccount).ExecuteAsync();
	
	// Store the access token securely for later use.

}
catch (MsalUiRequiredException)
{
    try
    {
        // This means we need to login again through the MSAL window.

		//this is where it hangs and I don't see any error or response
        var authResult = await _pca.AcquireTokenInteractive(Scopes)
                                    .WithUseEmbeddedWebView(true)
                                    .ExecuteAsync();

        // Store the access token securely for later use.
        
    }

ADFS server is working fine for other browsers applications.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,146 questions
Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
16,541 questions
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.
3,953 questions
{count} votes

1 answer

Sort by: Most helpful
  1. hernandoZ 26 Reputation points
    2023-09-19T11:50:48.77+00:00

    Problem solve it was an ADFS Serve configuration.

    0 comments No comments