pde159 / yii2-authclient-microsoft
Microsoft 365/Azure auth provider
Installs: 244
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 1
Open Issues: 1
pkg:composer/pde159/yii2-authclient-microsoft
Requires
- yiisoft/yii2-authclient: >=2.2.7
This package is auto-updated.
Last update: 2025-09-28 01:38:57 UTC
README
Yii2 authclient for Microsoft 365/Azure
Installation
With Composer :
composer require pde159/yii2-authclient-microsoft
or add to "require" section to composer.json
"pde159/yii2-authclient-microsoft": "*"
Usage
First create you Application via Microsoft Azure Portal and configure :
- a redirect URI
- a secret key
- set to
all tenant
for multitenant availability
And add the Oauth2 client to your Yii2 configuration component
section
'components' => [ 'authClientCollection' => [ 'class' => \yii\authclient\Collection::className(), 'clients' => [ 'microsoft' => [ 'class' => 'pde159\authclient\Microsoft', 'returnUrl' => 'http://localhost/user/login', 'clientId' => 'clientIDyoudefinedInAzurePortal', 'clientSecret' => 'SecretyoucratedinAzurePortal', ], ... ], ], ... ]