Skip to content

Simple app that Signs in a User to AzureAD and calls the Microsoft Graph.

Notifications You must be signed in to change notification settings

danieldobalian/AADv2-php-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Azure AD App built in PHP using the v2 Endpoint

This is a small php app that uses the Azure AD v2 endpoint to get authorization for the Microsoft Graph.

Authors

Daniel Dobalian (dadobali@microsoft.com)

Steps to Run

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

References

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

phpleague OAuth2.0 Client

TheNetworg's AAD Plugin

About

Simple app that Signs in a User to AzureAD and calls the Microsoft Graph.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages