PHPackages                             xrh0905/oauth-microsoft - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. xrh0905/oauth-microsoft

ActiveFlarum-extension[Authentication &amp; Authorization](/categories/authentication)

xrh0905/oauth-microsoft
=======================

Log in to your Flarum forum with Microsoft

v2.0.0(2mo ago)37303MITPHP

Since May 27Pushed 2mo agoCompare

[ Source](https://github.com/xrh0905/flarum-ext-oauth-microsoft)[ Packagist](https://packagist.org/packages/xrh0905/oauth-microsoft)[ RSS](/packages/xrh0905-oauth-microsoft/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (6)Versions (5)Used By (0)

Log In With Microsoft
=====================

[](#log-in-with-microsoft)

[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667) [![Latest Stable Version](https://camo.githubusercontent.com/c4a144cefc42f907005a2d8bc7ea02d712ba0c41eecc7e75a6679d68112b36a3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f787268303930352f6f617574682d6d6963726f736f66742e737667)](https://packagist.org/packages/xrh0905/oauth-microsoft) [![Total Downloads](https://camo.githubusercontent.com/58859da98988cc0c045746fbf3af2b4dbdba8a681fe8021962d97bf4981115ad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f787268303930352f6f617574682d6d6963726f736f66742e737667)](https://packagist.org/packages/xrh0905/oauth-microsoft)

[![](https://camo.githubusercontent.com/ebe6b26a6dab73f9107745437ff90022fe03eee237891f16081efa481bdfba38/68747470733a2f2f6578746976657273652e636f6d2f657874656e73696f6e2f787268303930352f6f617574682d6d6963726f736f66742f6f70656e2d67726170682d696d616765)](https://camo.githubusercontent.com/ebe6b26a6dab73f9107745437ff90022fe03eee237891f16081efa481bdfba38/68747470733a2f2f6578746976657273652e636f6d2f657874656e73696f6e2f787268303930352f6f617574682d6d6963726f736f66742f6f70656e2d67726170682d696d616765)

Log in to your Flarum forum with Microsoft. An addon for [FoF OAuth](https://github.com/friendsofflarum/oauth).

Supports personal Microsoft accounts (Outlook, Hotmail, Live) as well as work and school accounts via [Microsoft Entra ID](https://learn.microsoft.com/en-us/entra/identity/) (Azure Active Directory).

See also:

Installation
------------

[](#installation)

Install with composer:

```
composer require xrh0905/oauth-microsoft
php flarum cache:clear
```

Updating
--------

[](#updating)

```
composer update xrh0905/oauth-microsoft
php flarum cache:clear
```

Setup
-----

[](#setup)

### 1. Register an Application in the Azure Portal

[](#1-register-an-application-in-the-azure-portal)

1. Sign in to the [Azure Portal](https://portal.azure.com).
2. Navigate to **Microsoft Entra ID** → **App registrations** → **New registration**.
3. Fill in the form:
    - **Name**: anything descriptive, e.g. *My Flarum Forum*.
    - **Supported account types**: choose who can sign in (see [Choosing a Tenant](#choosing-a-tenant) below).
    - **Redirect URI**: choose **Web** as the platform, then paste the callback URL shown in this extension's settings page in your Flarum Admin panel (it looks like `https://your-forum.com/auth/microsoft`).
4. Click **Register**.

### 2. Obtain the Client ID and Client Secret

[](#2-obtain-the-client-id-and-client-secret)

1. On the application's **Overview** page, copy the **Application (client) ID** — this is your `Client ID`.
2. Go to **Certificates &amp; secrets** → **New client secret**.
3. Enter a description and choose an expiry, then click **Add**.
4. Copy the **Value** immediately (it is only shown once) — this is your `Client Secret`.

### 3. Configure the permissions

[](#3-configure-the-permissions)

1. On application's **Authenication** → **Settings** page, make sure to tick `ID tokens (used for implicit and hybrid flows)` checkbox.
2. On application's **API Permissions** page, grant `openid profile email` under **Graph API** in **Delegated** mode.

### 4. Configure the Extension

[](#4-configure-the-extension)

In your Flarum Admin panel, go to **Extensions → Log In With Microsoft** and enter the `Client ID` and `Client Secret` obtained above. If you want to restrict sign-in to a specific audience, also set the **Tenant** field (see below).

---

Choosing a Tenant
-----------------

[](#choosing-a-tenant)

The **Tenant** field controls which Microsoft accounts are allowed to sign in. It needs to match the settings in **Supported account types**.

ValueWho can sign in*(blank)* / `common`Personal Microsoft accounts **and** work/school (Azure AD) accounts from any organisation`organizations`Work/school (Azure AD) accounts from any organisation only`consumers`Personal Microsoft accounts (Outlook, Hotmail, Live) onlyA tenant ID (GUID)Only accounts from that specific Azure AD tenant, e.g. `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`A primary domainOnly accounts from that Azure AD tenant, e.g. `contoso.com`> **Tip:** If your forum is for an organisation and you want to restrict sign-in to your company's Azure AD, set the tenant to your tenant ID or your primary domain. You can find your tenant ID on the **Microsoft Entra ID → Overview** page in the Azure Portal.

> **Note:** If you set **Supported account types** to *Single tenant* in the Azure Portal, you must also set the **Tenant** field here to your tenant ID or domain, otherwise the authentication endpoint will reject requests.

---

Links
-----

[](#links)

- [Packagist](https://packagist.org/packages/xrh0905/oauth-microsoft)
- [GitHub](https://github.com/xrh0905/flarum-ext-oauth-microsoft)
- [Discuss](https://github.com/xrh0905/flarum-ext-oauth-microsoft/discussions)

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance83

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 64.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~349 days

Total

4

Last Release

87d ago

Major Versions

v0.0.1 → v1.0.02023-06-03

v1.0.1 → v2.0.02026-04-09

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29017419?v=4)[xrh0905](/maintainers/xrh0905)[@xrh0905](https://github.com/xrh0905)

---

Top Contributors

[![imorland](https://avatars.githubusercontent.com/u/16573496?v=4)](https://github.com/imorland "imorland (9 commits)")[![flarum-bot](https://avatars.githubusercontent.com/u/39334649?v=4)](https://github.com/flarum-bot "flarum-bot (2 commits)")[![xrh0905](https://avatars.githubusercontent.com/u/29017419?v=4)](https://github.com/xrh0905 "xrh0905 (2 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (1 commits)")

---

Tags

SSOoauthmicrosoftloginflarum

### Embed Badge

![Health badge](/badges/xrh0905-oauth-microsoft/health.svg)

```
[![Health](https://phpackages.com/badges/xrh0905-oauth-microsoft/health.svg)](https://phpackages.com/packages/xrh0905-oauth-microsoft)
```

###  Alternatives

[thenetworg/oauth2-azure

Azure Active Directory OAuth 2.0 Client Provider for The PHP League OAuth2-Client

25310.7M83](/packages/thenetworg-oauth2-azure)[flarum-lang/russian

Russian language pack for Flarum.

12128.3k](/packages/flarum-lang-russian)[maicol07/flarum-ext-sso

SSO for Flarum

468.7k](/packages/maicol07-flarum-ext-sso)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
