Exceptions in ADAL4J - AzureAD/azure-activedirectory-library-for-java GitHub Wiki

ADAL4J proposes 2 exception classes:

  • AuthenticationException is used directly for exceptions which are local to the library
  • AdalClaimsChallengeException is an exception thrown by the service in case a resource requires more claims from the user (for instance 2-factor authentication).

Handling AdalClaimChallengeException

You can read about conditional access here and see the Java web application sample to see how to handle an AdalClaimsChallengeException.