File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -26,28 +26,24 @@ To call Microsoft Graph, your app must acquire an access token from the Microsof
26
26
### 3. Import modules
27
27
28
28
``` python
29
- from azure.identity import ClientSecretCredential
29
+ from azure.identity import InteractiveBrowserCredential
30
30
from msgraph.core import GraphClient
31
31
```
32
32
33
33
### 4. Configure a Credential Object
34
34
35
35
``` python
36
- # Using ClientSecretCredential for demonstration purposes.
36
+ # Using InteractiveBrowserCredential for demonstration purposes.
37
37
# There are many other options for getting an access token. See the following for more information.
38
38
# https://pypi.org/project/azure-identity/
39
39
40
- credential = ClientSecretCredential(
41
- tenant_id = ' xxxxxxxxxxx' ,
42
- client_id = ' xxxxxxxxxxx' ,
43
- client_secret = ' xxxxxxxxx'
44
- )
40
+ browser_credential = InteractiveBrowserCredential(client_id = ' YOUR_CLIENT_ID' )
45
41
```
46
42
47
43
### 5. Pass the credential object to the GraphClient constructor.
48
44
49
45
``` python
50
- client = GraphClient(credential = credential )
46
+ client = GraphClient(credential = browser_credential )
51
47
```
52
48
53
49
### 6. Make a requests to the graph using the client
You can’t perform that action at this time.
0 commit comments