Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Microsoft Laravel Package

socialiteproviders/microsoft

Microsoft provider for Laravel Socialite adds Microsoft (Azure AD) OAuth login to your Laravel app. Install via Composer, configure your client ID, secret, and tenant, then use Socialite::driver('microsoft') to authenticate users and retrieve profile data.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. This is a Socialite driver, not an identity platform. It teaches laravel/socialite the Entra ID (Azure AD) OAuth2 endpoints and maps the Microsoft Graph me payload into Socialite's standard User object. That makes it a good fit only where Socialite is already the identity seam: one more provider behind Socialite::driver('microsoft'), with token, state, and callback mechanics delegated upstream to Socialite and socialiteproviders/manager. It is a bad fit as a standalone auth layer, and it does not cover Graph data access, token lifecycle, daemon/background flows, or native/mobile auth — those need MSAL or the Graph SDK alongside it.

Integration feasibility. High for a conventional Laravel web app: Composer install, register the SocialiteWasCalled listener, add a microsoft block to config/services.php, wire redirect and callback routes, map the returned user. The package is the smallest part of the work. The bulk is tenant topology, app registration, admin consent, scope selection, redirect URI inventory, and — critically — deciding what the canonical user identifier is. A TPM should plan the effort around those identity operations, not around the adapter.

Technical risk. Low code risk, material dependency and identity risk:

  • Weak adoption signal. 35 stars and 0 listed dependents. These likely understate reach because this is a split package inside the larger socialiteproviders/providers monorepo, but they still mean this specific split artifact has little visible downstream validation. Treat it as a replaceable adapter, not a strategic dependency.
  • Monorepo split-package drift. Releases ride the monorepo. Version alignment against laravel/socialite, socialiteproviders/manager, Laravel, and PHP must be verified at install and at every upgrade — a Socialite major can leave this split package behind.
  • Overlapping drivers. Microsoft providers exist in several forms (microsoft, microsoft-azure, in-house subclasses). Picking the wrong one causes churn and inconsistent claim mapping later.
  • Identity risk is externalized, not removed. Consent, conditional access, MFA, guest users, and claim variability are owned by Microsoft and the customer's tenant. The package does not mitigate any of them.
  • Unsafe identity mapping. Microsoft's email claim is not universally present or stable. Using email as the primary key invites account-linking takeover. Link on Entra oid plus tenant_id.
  • Operational coupling. Client secret expiry and missing admin consent are the two most common production outages, and neither is solved by the adapter.

Key questions a TPM must get answered before commit:

  • Which tenant model: single-tenant, multi-tenant (common/organizations), consumer accounts, or CIAM/B2C?
  • Which account types must authenticate — members, guests, external collaborators, personal accounts?
  • What is the canonical identity key (oid, sub, UPN, employee ID), and which team owns that mapping?
  • Authentication only, or Graph scopes with refresh-token handling for mail, calendar, files, Teams?
  • Who owns the Entra app registration, the consent workflow, secret rotation, and the redirect URI inventory?
  • Is this the right driver strategically, or does microsoft-azure / an in-house AbstractProvider fit better?
  • What is the exit plan if this split package lags a Socialite major release?

Integration Approach

Stack fit. A Laravel application on a current PHP 8.x runtime, Socialite 5.x-era APIs, and the SocialiteProviders manager, with a normal server-side session for OAuth state. It does not fit stateless API-only backends without the team supplying its own state handling, and it does not replace MSAL for native, mobile, or daemon scenarios.

Migration path. Additive provider, not a rip-and-replace:

  1. Inventory existing auth paths — local passwords, other Socialite providers, legacy Azure AD connectors, bespoke OAuth code.
  2. Fix the identity key before writing code: provider = microsoft, provider_user_id = oid, persist tenant_id. No auto-linking on unverified email.
  3. Introduce the package behind a feature flag against a non-production Entra tenant with a pilot group.
  4. Run parallel login during the pilot; link existing accounts by an explicit verified attribute or admin-assisted migration.
  5. Cut over the production tenant once consent, redirect URIs, and secret-rotation runbooks are signed off.
  6. Retire legacy OAuth routes only after a full login cycle and a defined rollback window.

Compatibility checks.

  • Pin the split package; verify Composer constraints against installed laravel/socialite, socialiteproviders/manager, Laravel, and PHP.
  • Confirm the listener-registration style for the app's Laravel version, including whether event discovery is enabled.
  • Confirm tenant selection is configurable in the pinned version rather than assumed.
  • Validate session configuration across all app nodes — OAuth state in session fails behind inconsistent stores or mismatched callback domains.
  • Verify config:cache behavior so tenant and redirect values aren't baked incorrectly per environment.
  • Test against the real account types in scope: member, guest, consumer, and MFA/conditional-access-affected users.

Sequencing. Entra app registration and consent model first, then a package spike, then identity mapping, then UI, then production tenant rollout. Reversing this order produces a working login that authenticates the wrong person or cannot obtain consent — the most expensive way to discover a scoping mistake.

Operational Impact

Maintenance. Low code maintenance, moderate dependency maintenance. Pin and upgrade deliberately alongside Socialite and the manager; watch monorepo release cadence and Socialite major-version breaks. Budget a small recurring allocation for Composer updates plus a periodic login smoke test per tenant model.

Support. Community-supported, no vendor SLA; the monorepo issue tracker is the channel. Given the weak split-package adoption signal, plan for the possibility of forking the provider or substituting a small in-house AbstractProvider subclass. That fallback is genuinely cheap — the driver is thin — because the expensive work (tenant setup, consent, identity mapping) is internal and stays internal either way.

Scaling. Login volume is small relative to application traffic and the OAuth exchange is one external call per login. The package is not a scaling bottleneck. Scaling risk arrives after login: Graph throttling, refresh-token storage and encryption, per-user caching, and retry design all become application responsibilities. Socialite hands you tokens; it does not manage their lifecycle.

Failure modes to plan for.

  • AADSTS50011 redirect URI mismatch after a domain, environment, or deployment change.
  • AADSTS65001 consent missing when new scopes are added without admin consent.
  • AADSTS700016 app not provisioned in the tenant, common in single-tenant and guest scenarios.
  • Expired client secret — a total login outage; needs expiry monitoring and a rotation runbook with overlap.
  • Claim variability — absent email, changed UPN, guest accounts — breaking user matching.
  • Conditional access / MFA interruptions surfacing as opaque callback errors if not handled gracefully.
  • Session/state mismatch behind load balancers or across subdomains.
  • Stale config cache after tenant or credential changes.
  • Account-linking takeover from email-based auto-linking without verification.
  • Provider abandonment or a Socialite major release with no corresponding split-package update.

Ramp-up. A Socialite-fluent Laravel developer integrates the package in under a day. A production-ready rollout — tenant selection, consent, identity mapping, secret rotation, rollback plan, pilot — is closer to one to two weeks of cross-team effort, with identity/security owning the Entra side. Staff an identity owner, not just a Laravel developer, and position the package in the plan as a replaceable adapter inside a larger Microsoft identity integration rather than as the integration itself.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums