https://github.com/harrygulliford/socialite-microsoft-graph
Microsoft Graph Provider for Laravel Socialite
https://github.com/harrygulliford/socialite-microsoft-graph
laravel laravel-socialite microsoft-graph php
Last synced: 7 months ago
JSON representation
Microsoft Graph Provider for Laravel Socialite
- Host: GitHub
- URL: https://github.com/harrygulliford/socialite-microsoft-graph
- Owner: harrygulliford
- License: mit
- Created: 2019-09-04T05:14:22.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2023-03-22T05:05:33.000Z (over 3 years ago)
- Last Synced: 2025-10-01T00:58:13.692Z (10 months ago)
- Topics: laravel, laravel-socialite, microsoft-graph, php
- Language: PHP
- Homepage:
- Size: 11.7 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Microsoft Graph Provider for Laravel Socialite
[](https://packagist.org/packages/harrygulliford/socialite-microsoft-graph)
[](https://packagist.org/packages/harrygulliford/socialite-microsoft-graph)
[](https://packagist.org/packages/harrygulliford/socialite-microsoft-graph)
This package extends Laravel Socialite to give a convenient method of authenticating via the Microsoft Graph OAuth2 provider.
Support for Laravel 6+ and Socialite 5+, using PHP 7.3+ & 8.0+.
## Installation
You can install the package via composer:
```bash
composer require harrygulliford/socialite-microsoft-graph
```
Then add the service to your `config/services.php` file:
```
'microsoft-graph' => [
'client_id' => env('MS_GRAPH_KEY'),
'client_secret' => env('MS_GRAPH_SECRET'),
'tenant_id' => env('MS_GRAPH_TENANT_ID', 'common'),
'redirect' => env('MS_GRAPH_REDIRECT_URL'),
],
```
## Usage
You are able to use the provider in the same manner as a regular Socialite provider.
```php
return Socialite::with('microsoft-graph')->redirect();
```
For more information, please refer to the [Laravel Socialite documentation](https://laravel.com/docs/6.0/socialite).
## License
The MIT License (MIT). Please see the [license file](LICENSE.md) for more information.