Skip to content

Commit ca86c68

Browse files
committed
update samples for delegated permission credentials
1 parent 2abfe27 commit ca86c68

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ credential = ClientSecretCredential(
121121
'client_id',
122122
'client_secret'
123123
)
124-
scopes = ["User.ReadWrite"]
124+
scopes = ["User.Read"]
125125
client = GraphServiceClient(credentials=credential, scopes=scopes)
126126

127127
# GET /users/{id | userPrincipalName}
@@ -143,7 +143,7 @@ credential = InteractiveBrowserCredential(
143143
client_id=os.getenv('client_id'),
144144
tenant_id=os.getenv('tenant_id'),
145145
)
146-
scopes = ["User.ReadWrite"]
146+
scopes = ["User.Read"]
147147
client = GraphServiceClient(credentials=credential, scopes=scopes,)
148148

149149
# GET /me

docs/authentication_samples.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ credential = DeviceCodeCredential(
1414
tenant_id='TENANT_ID',
1515
)
1616

17-
scopes = ["User.ReadWrite"]
17+
scopes = ["User.Read"]
1818

1919
# Create an API client with the credentials and scopes.
2020
client = GraphServiceClient(credentials=credential, scopes=scopes)
@@ -40,7 +40,7 @@ credentials = InteractiveBrowserCredential(
4040
tenant_id=os.getenv('tenant_id'),
4141
)
4242

43-
scopes = ["User.ReadWrite"]
43+
scopes = ["User.Read"]
4444

4545
# Create an API client with the credentials and scopes.
4646
client = GraphServiceClient(credentials=credential, scopes=scopes)

0 commit comments

Comments
 (0)