Skip to content

Commit 07a1d78

Browse files
committed
use default scopes for delegated permissions in samples
1 parent 885e623 commit 07a1d78

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ from azure.identity import DeviceCodeCredential
6565

6666
credential = DeviceCodeCredential("client_id",
6767
"tenant_id")
68-
graph_scopes = ['User.Read', 'Calendars.ReadWrite.Shared']
68+
scopes = ['https://graph.microsoft.com/.default']
6969
```
7070

7171
### 2.3 Initialize a GraphServiceClient object
@@ -97,7 +97,7 @@ credentials = DeviceCodeCredential(
9797
'CLIENT_ID',
9898
'TENANT_ID',
9999
)
100-
scopes = ['User.Read', 'Mail.Read']
100+
scopes = ['https://graph.microsoft.com/.default']
101101
client = GraphServiceClient(credentials=credentials, scopes=scopes)
102102
```
103103

@@ -140,7 +140,7 @@ from azure.identity import InteractiveBrowserCredential
140140
from msgraph import GraphServiceClient
141141

142142
credential = InteractiveBrowserCredential()
143-
scopes=['User.Read']
143+
scopes = ['https://graph.microsoft.com/.default']
144144
client = GraphServiceClient(credentials=credential, scopes=scopes,)
145145

146146
# GET /me

0 commit comments

Comments
 (0)