socialiteproviders/microsoft-azure
Laravel Socialite provider for Microsoft Azure (Entra ID) OAuth login. Configure client ID, secret and tenant to sign users in, retrieve their id, name and email, support multiple tenants, and generate Azure logout URLs.
tenant config value is a product lever, not just a credential. A multi-tenant app ID lowers sales friction (any customer can self-serve connect), while a single-tenant configuration supports customers who mandate a dedicated app registration in their own tenant. The package supports both without code forks, so you can decide per-deployment or per-customer-segment rather than per-release.proxy setting and overridable graph_url mean you can serve customers behind corporate proxies and customers on sovereign/non-commercial Microsoft clouds (e.g., GCC High, government or regional Graph endpoints) with configuration only. That converts "we can't support regulated customers" into a supportable segment without new engineering work — but see the trust caveat below.Adopt when:
Look elsewhere or build in-house when:
graph_url override is genuinely a trust boundary — access tokens are sent to whatever endpoint is configured. If your deployment model lets less-trusted operators change environment configuration, either lock that variable down or reconsider exposing it.To executives: Enterprise buyers on Microsoft 365 currently can't use their work accounts to sign in, which shows up as friction in procurement and security review. This package lets us close that gap with configuration rather than a custom build — days of integration work instead of a multi-week project — and it covers the two commercial shapes we sell into: self-serve multi-tenant connection and customer-owned single-tenant app registrations. The tradeoff is a small third-party dependency in the auth path with limited community adoption, which we mitigate with version pinning, a security review, and an exit path to a first-party implementation if needed.
To engineering: It's a SocialiteProviders OAuth2 driver for Microsoft Entra ID. Install via Composer, add an azure block to config/services.php (client ID, secret, redirect, tenant, optional proxy and Graph URL), and register the SocialiteWasCalled listener in AppServiceProvider::boot() for Laravel 11+. We get tenant configurability, proxy support, and an overridable Graph endpoint for testing — no custom OAuth code and no new architectural pattern. Risks to flag: auth-critical dependency with low adoption, so pin the version, review the Graph URL override as a token-exposure surface, and keep our auth abstraction thin enough that swapping to an in-house provider later is contained.
How can I help you explore Laravel packages today?