This is a small php app that uses the Azure AD v2 endpoint to get authorization for the Microsoft Graph.
Daniel Dobalian (dadobali@microsoft.com)
Register an Azure AD v2 app to obtain a client id (or consumer key) on our Microsoft Identity Portal. Once you register a new app, Click "Generate New Password'. This will be your consumer secret. Then click "Add Platform" and add a Redirect URI's for the desired redirect route in the app. If you use the same redirect URI as in the sample code, you will make 2 changes in code.
Included in the sample is a comoser file with the required dependencies, you can run:
composer install
composer update
Then run the following command and navigate to localhost:8000/login.php:
php -S localhost:8000
This app uses the phpleague's Library and TheNetworg's plugin for all Identity code. Please report any library or plugin issues to these authors.
Thanks to Caitlin for reviewing and improving this sample.
###Frameworks