Prompt
What should I use to add Microsoft login to a B2B app?
Latest observation
Oct 6, 2026
OpenAI APIWeb search: off
If you want Microsoft login for a B2B app, the usual choice is:
Use Microsoft Entra ID (formerly Azure AD)
Best fit when:
- Your users are from other organizations
- You want companies’ employees to sign in with their work Microsoft accounts
- You need enterprise SSO, access control, and tenant-based authentication
Typical options
1. Microsoft Entra ID
Use this for:
- Internal business users
- External users from partner companies
- Single-tenant or multi-tenant B2B sign-in
2. Microsoft Entra External ID
Use this if your app is more of a customer/partner-facing app and you want broader external identity support, including non-Microsoft identities.
3. Microsoft personal accounts
If you mean users signing in with:
@outlook.com@hotmail.com- Microsoft consumer accounts
then you’d support personal Microsoft accounts too, but that’s usually not the main B2B path.
What to implement
For most B2B apps, you’d use:
- OpenID Connect
- OAuth 2.0
- Microsoft identity platform / Entra ID endpoints
Common libraries:
- MSAL for Microsoft auth
- Platform SDKs for your stack:
- MSAL.js
- MSAL.NET
- MSAL Python
- MSAL Java
- MSAL Node
Recommendation
If your app is truly B2B, start with:
Microsoft Entra ID + OpenID Connect + MSAL
If you want, I can also tell you:
- whether to choose single-tenant vs multi-tenant
- how to set this up in React, Node, .NET, or Python
- whether you need Entra External ID instead