When building applications for customers, partners, or external users, authentication is one of the first things we need to think about. We need a secure login process, but we don't necessarily want to spend time building and maintaining our own authentication system.

This is where Microsoft Entra External ID can help. It allows us to use Microsoft for authentication instead of building everything ourselves, such as login screens, password management, account recovery, and identity verification.

However, when integrating External ID into our application, we need to decide how the login experience should work for the user.

There are two approaches worth looking at:

· Browser-Delegated Authentication

· Native Authentication.

1. Browser-Delegated Authentication

This is a common and straightforward approach for web applications. When a user wants to sign in, the application redirects them to a Microsoft-hosted login page. The user completes the login process there, and Microsoft redirects them back to the application once authentication is successful.

With this approach, we don't need to build our own login screens or handle user passwords directly. Microsoft takes care of the authentication process, while our application manages its own session and access to application features.

It keeps the authentication process separate from our application and reduces the amount of security-related code we need to maintain.

Architecture:

Browser Deleted authentication

The biggest advantage here is simplicity. We rely on Microsoft for the authentication UI and flow, which reduces the code we need to maintain and our exposure to credential-handling risks.

2. Native Authentication

Native authentication works a little differently. Instead of sending users to a Microsoft login page, the application provides its own login screens.

The application communicates directly with Microsoft Entra External ID through its supported authentication APIs to complete the login process.

This means users can sign in without leaving the application. The login experience stays within the application, while Microsoft Entra External ID handles the actual authentication.

Architecture:

Native Authentication

Key distinction: Native authentication uses Entra External ID's native authentication APIs directly from the Angular application, rather than redirecting the user to a system browser.

This approach gives us more control over how the login page looks and feels. We can make the login process part of our application instead of redirecting users to another page.

But there is more work involved. The development team needs to build and maintain the login screens, handle authentication responses, and make sure everything follows the required security practices.

What is the difference?

Both approaches allow users to sign in using Microsoft Entra External ID, but the way they handle the login process is different.

Browser-Delegated Authentication

  • Microsoft provides the login page.

  • The application redirects users to Microsoft's sign-in page.

  • After a successful login, Microsoft sends the user back to the application.

  • Less development work is required.

  • The development team does not need to build or maintain login screens.

Native Authentication

  • The application has its own login screens.

  • Users enter their login details within the application.

  • The application communicates directly with Microsoft Entra External ID using its authentication APIs.

  • Developers have more control over how the login process looks and works.

  • More development, testing, and security work is involved.

Which one should we choose?

For most business applications, I would choose browser-delegated authentication. It is simpler to implement and maintain, and Microsoft takes care of the login page.

Native authentication is a better fit when we need more control over the login experience and are prepared to handle the extra development and maintenance work.

Conclusion

Microsoft Entra External ID gives us a way to manage external user authentication without having to build our own identity system.

Both approaches have their place. The choice really depends on what we need from the application. If we want a simpler implementation with less maintenance, browser-delegated authentication is a good choice. If we need more control over the login experience, native authentication is worth considering.

Happy Coding!