Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Best Practices for a robust enterprise ready application

Santiago Gonzalez edited this page Mar 28, 2018 · 5 revisions

You've seen that with ADAL4J you can quite simply acquire a token for a protected Web API. you benefit from the token cache, and you don't have to handle yourself refreshing tokens.

However, to build robust, enterprise ready applications, you will need to do a bit more. For instance you'll want to:

  • carefully handle exceptions, both when you acquire a token, but also when you call the protected Web API. The way to handle them is different depending on the error
  • in particular, if your application runs in an Azure AD tenant where the tenant admins have set policies to enforce Multiple Factor Authentication (MFA), you will need to react to Claim challenge. this is true both on Desktop applications, and on Web APIs and explained in Handling AdalClaimChallengeException
  • You might want to enable logging, to troubleshoot your application, and help your users, while respecting their privacy and being compliant with GDPR
  • Finally in the case of multi-tenant applications there are things to know to avoid that your end users have to sign-in each time they use the application.

Note: some topics referenced in this page don't have a wiki page yet