PHPackages                             ageid/aad - 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. ageid/aad

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

ageid/aad
=========

This package allows obtaining / validating an authentication token from Azure Active Directory

1.0(6y ago)0231PHPPHP &gt;=5.4.0

Since Jun 6Pushed 6y agoCompare

[ Source](https://github.com/AgeID/aad)[ Packagist](https://packagist.org/packages/ageid/aad)[ RSS](/packages/ageid-aad/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

   services active-directory   platforms php   author AgeID  Authenticating requests to an Azure AD resource from a PHP web app
==================================================================

[](#authenticating-requests-to-an-azure-ad-resource-from-a-php-web-app)

This PHP class allows obtaining an authentication token object from Azure Active Directory, which in turn is used to generate an Authorization header that you must add to all your requests to the desired Azure Active Directory application (resource). This class uses OAuth 2.0 Client Credentials to authenticate and get authorization to the Graph API. Pre-existing access to an Azure tenant is required. Using a standard Microsoft account will not be enough.

### Using the PHP class

[](#using-the-php-class)

1. Construct your AzureActiveDirectoryHelper instance by passing the $clientId, $tenant and, if desired, a custom implementation of the Guzzle client inside $options\['httpClient'\]
2. Obtain an Auth Token object by providing the appropriate parameter values, as generated and obtained from above: $authToken = $aadHelper-&gt;getToken($clientId, $resource).
3. Prepare your cURL request to the AAD service according to its API usage definition.
4. Add the obtained $authToken to your cURL request along with any other applicable headers. Example: curl\_setopt($ch, CURLOPT\_HTTPHEADER, array($authToken, 'OtherExampleHeaderName:OtherExampleHeaderValue', ...)).
5. Execute the cURL request.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

Unknown

Total

1

Last Release

2535d ago

### Community

Maintainers

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

---

Top Contributors

[![ageid-dev](https://avatars.githubusercontent.com/u/39263871?v=4)](https://github.com/ageid-dev "ageid-dev (3 commits)")

---

Tags

AgeID

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ageid-aad/health.svg)

```
[![Health](https://phpackages.com/badges/ageid-aad/health.svg)](https://phpackages.com/packages/ageid-aad)
```

###  Alternatives

[google/auth

Google Auth Library for PHP

1.4k272.7M162](/packages/google-auth)[ellaisys/aws-cognito

AWS Cognito package that allows Auth and other related features using the AWS SDK for PHP

120220.7k1](/packages/ellaisys-aws-cognito)[clerkinc/backend-php

2755.0k](/packages/clerkinc-backend-php)[kinde-oss/kinde-auth-php

Kinde PHP SDK for authentication

2369.5k3](/packages/kinde-oss-kinde-auth-php)

PHPackages © 2026

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