PHPackages                             stolfam/ms-azure-sso-php - 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. stolfam/ms-azure-sso-php

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

stolfam/ms-azure-sso-php
========================

Easy-to-use PHP connector for Microsoft Azure SSO authentication

1.0.7(1y ago)0599MITPHPPHP &gt;= 8.0.0

Since Sep 12Pushed 1y ago1 watchersCompare

[ Source](https://github.com/stolfam/ms-azure-sso-php)[ Packagist](https://packagist.org/packages/stolfam/ms-azure-sso-php)[ RSS](/packages/stolfam-ms-azure-sso-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (2)Versions (9)Used By (0)

MS Azure SSO PHP
================

[](#ms-azure-sso-php)

Install
-------

[](#install)

`composer require stolfam/ms-azure-sso-php`

### Nette

[](#nette)

Neon config:

```
parameters:
    microsoft:
        azure:
            loginBaseUri: https://login.microsoftonline.com
            apiBaseUri: https://login.windows.net
            appId: xxx
            clientSecret: xxx
            tenantId: xxx
            redirectUri: http://localhost
            refreshTokenRotationTime: 60
            refreshTokenKey: storageKey

services:
    - Stolfam\MS\Azure\Client(%microsoft.azure%)

```

Use
---

[](#use)

Redirect to Login URL:

```
$client = new Client($arrayArgs);
$state = "abc123";
$loginUrl = $client->getLoginUrl($state)
// redirect to $loginUrl to invoke user authentication with MS AZure

```

Handle returned Authorization Code:

```
$code = $_GET['code'];
$state = $_GET['state']; // abc123

// set callback
$client->onAuthSuccess[] = function(UserProfile $userProfile) {
    // authentication successful
    // persist user data where you need
    echo $userProfile->id;
    echo $userProfile->name;
    echo $userProfile->email;
};

if($client->authorize($code)) {
    // success
    // i.e. redirect back to original page before login invoked
}

```

Handle expired login:

```
if(!$client->isSessionValid()) {
    // session expired
    // try to re-authorize
    $client->invokeReAuthorization();
}

```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance43

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~21 days

Recently: every ~33 days

Total

8

Last Release

457d ago

PHP version history (2 changes)1.0.0PHP &gt;= 8.2.0

1.0.1PHP &gt;= 8.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/2a166fb0b766fa1febb53e4dcee9075a1350e7438e623cd7baafbd8e40557fb9?d=identicon)[stolfam](/maintainers/stolfam)

---

Top Contributors

[![stolfam](https://avatars.githubusercontent.com/u/37073073?v=4)](https://github.com/stolfam "stolfam (9 commits)")

### Embed Badge

![Health badge](/badges/stolfam-ms-azure-sso-php/health.svg)

```
[![Health](https://phpackages.com/badges/stolfam-ms-azure-sso-php/health.svg)](https://phpackages.com/packages/stolfam-ms-azure-sso-php)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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