Skip to content

Commit 31036b5

Browse files
committed
Update getting started guide
1 parent 2d33067 commit 31036b5

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

README.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,14 @@ device_credential = DeviceCodeCredential(
3131

3232
```
3333

34-
Create AuthorizationProvider, AuthorizationHandler and list of middleware
34+
Create an authorization provider object and a list of scopes
3535
```python
3636
auth_provider = TokenCredentialAuthProvider(device_credential)
37-
options = AuthMiddlewareOptions(['mail.send', 'user.read'])
38-
auth_handler = AuthorizationHandler(auth_provider, auth_provider_options=options)
39-
40-
middleware = [
41-
auth_handler
42-
]
37+
scopes = ['mail.send', 'user.read']
4338
```
4439

4540
```python
46-
graph_session = GraphSession(middleware=middleware)
41+
graph_session = GraphSession(scopes, auth_provider)
4742
result = graph_session.get('/me')
4843
print(result.json())
4944
```

msgraphcore/graph_session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Creates a session object
2+
Graph Session
33
"""
44
from requests import Session, Request, Response
55

0 commit comments

Comments
 (0)