Skip to content

Commit d5446e7

Browse files
updated readme and added tenency support to config
1 parent ac902f4 commit d5446e7

File tree

4 files changed

+40
-28
lines changed

4 files changed

+40
-28
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
.DS_Store
1+
.DS_Store
2+
.idea

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "daveismyname/laravel-microsoft-graph",
3-
"description": "A Laravel Microsoft Graph API package",
3+
"description": "A Laravel Microsoft Graph API (Office365) package",
44
"license": "MIT",
55
"authors": [
66
{
@@ -10,7 +10,7 @@
1010
}
1111
],
1212
"homepage": "https://github.com/daveismyname/laravel-microsoft-graph",
13-
"keywords": ["Laravel", "MsGraph", "Graph", "Microsoft Graph"],
13+
"keywords": ["Laravel", "MsGraph", "Graph", "Microsoft Graph", "Office365"],
1414
"require": {
1515
"illuminate/support": "~5",
1616
"league/oauth2-client": "^1.4",

config/msgraph.php

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
return [
44

5-
/*
6-
* the clientId is set from the Microsoft portal to identify the application
7-
* https://apps.dev.microsoft.com
8-
*/
5+
/*
6+
* the clientId is set from the Microsoft portal to identify the application
7+
* https://apps.dev.microsoft.com
8+
*/
99
'clientId' => env('MSGRAPH_CLIENT_ID'),
1010

1111
/*
@@ -15,8 +15,8 @@
1515
'clientSecret' => env('MSGRAPH_SECRET_ID'),
1616

1717
/*
18-
* Set the url to trigger the oauth process this url should call return MsGraph::connect();
19-
*/
18+
* Set the url to trigger the oauth process this url should call return MsGraph::connect();
19+
*/
2020
'redirectUri' => env('MSGRAPH_OAUTH_URL'),
2121

2222
/*
@@ -25,25 +25,36 @@
2525

2626
'msgraphLandingUri' => env('MSGRAPH_LANDING_URL'),
2727

28-
/*
28+
/*
29+
set the tenant authorize url
30+
*/
31+
32+
'tenantUrlAuthorize' => env('MSGRAPH_TENANT_AUTHORIZE'),
33+
34+
/*
35+
set the tenant token url
36+
*/
37+
'tenantUrlAccessToken' => env('MSGRAPH_TENANT_TOKEN'),
38+
39+
/*
2940
set the authorize url
3041
*/
3142

3243
'urlAuthorize' => 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize',
3344

34-
/*
45+
/*
3546
set the token url
3647
*/
3748
'urlAccessToken' => 'https://login.microsoftonline.com/common/oauth2/v2.0/token',
3849

39-
/*
50+
/*
4051
set the scopes to be used, Microsoft Graph API will accept up to 20 scopes
4152
*/
4253

4354
'scopes' => 'offline_access openid calendars.readwrite contacts.readwrite files.readwrite mail.readwrite mail.send tasks.readwrite mailboxsettings.readwrite user.readwrite',
4455

45-
/*
56+
/*
4657
The default timezone is set to Europe/London this option allows you to set your prefered timetime
4758
*/
4859
'preferTimezone' => env('MSGRAPH_PREFER_TIMEZONE', 'outlook.timezone="Europe/London"'),
49-
];
60+
];

readme.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,6 @@ In Laravel 5.5 the service provider will automatically get registered. In older
4747
];
4848
```
4949

50-
You can publish the migration with:
51-
52-
```bash
53-
php artisan vendor:publish --provider="Daveismyname\MsGraph\MsGraphServiceProvider" --tag="migrations"
54-
```
55-
56-
After the migration has been published you can create the tokens tables by running the migration:
57-
58-
```bash
59-
php artisan migrate
60-
```
61-
6250
You can publish the config file with:
6351

6452
```bash
@@ -130,7 +118,19 @@ return [
130118
];
131119
```
132120

133-
Ensure you've set the following urls in your .env file:
121+
You can publish the migration with:
122+
123+
```bash
124+
php artisan vendor:publish --provider="Daveismyname\MsGraph\MsGraphServiceProvider" --tag="migrations"
125+
```
126+
127+
After the migration has been published you can create the tokens tables by running the migration:
128+
129+
```bash
130+
php artisan migrate
131+
```
132+
133+
Ensure you've set the following in your .env file:
134134

135135
```bash
136136
MSGRAPH_CLIENT_ID=
@@ -154,7 +154,7 @@ To find your Office 365 tenant ID in the Azure AD admin center
154154

155155
Optionally add
156156
```bash
157-
MSGRAPH_PREFER_TIMEZONE=
157+
MSGRAPH_PREFER_TIMEZONE='outlook.timezone="Europe/London"'
158158
```
159159

160160

0 commit comments

Comments
 (0)