Prepare mobile apps for production

This article provides details about how to improve the quality and reliability of your mobile app before you move it to production.

Handle errors

As you prepare a mobile app for production, several error conditions can occur. The main cases you'll handle are silent failures and fallbacks to interaction. Other conditions that you should consider include no-network situations, service outages, requirements for admin consent, and other scenario-specific cases.

For each Microsoft Authentication Library (MSAL) type, you can find sample code and wiki content that describes how to handle error conditions:

Enable logging

To help in debugging and authentication failure troubleshooting scenarios, the Microsoft Authentication Library provides built-in logging support. Logging in each library is covered in the following articles:

Here are some suggestions for data collection:

  • Users might ask for help when they have problems. A best practice is to capture and temporarily store logs. Provide a location where users can upload the logs. MSAL provides logging extensions to capture detailed information about authentication.

  • If telemetry is available, enable it through MSAL to gather data about how users sign in to your app.

Validate your integration

Test your integration by following the Microsoft identity platform integration checklist.

Build for resilience

Learn how to increase resiliency in your app. For details, see Increase resilience of authentication and authorization applications you develop

Next steps

To try out additional samples, Mobile public client applications.