Skip to content

Commit 785b6c0

Browse files
authored
Fix a command to get a token
A message `"Command 'accesstoken get' is deprecated. Please use 'util accesstoken get' instead"` gets output into the standard output and messes up the token string. `util accesstoken get` command is used instead.
1 parent b3d1515 commit 785b6c0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/manual/docs/examples/graph/call-graph.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Author: [Garry Trinder](https://github.com/garrytrinder)
55
Obtain a new access token for the Microsoft Graph and use it an HTTP request.
66

77
```powershell tab="PowerShell Core"
8-
$token = o365 accesstoken get --resource https://graph.microsoft.com --new
8+
$token = o365 util accesstoken get --resource https://graph.microsoft.com --new
99
$me = Invoke-RestMethod -Uri https://graph.microsoft.com/v1.0/me -Headers @{"Authorization"="Bearer $token"}
1010
$me
1111
```
@@ -15,7 +15,7 @@ $me
1515

1616
# requires jq: https://stedolan.github.io/jq/
1717

18-
token=`o365 accesstoken get --resource https://graph.microsoft.com --new`
18+
token=`o365 util accesstoken get --resource https://graph.microsoft.com --new`
1919
me=`curl https://graph.microsoft.com/v1.0/me -H "Authorization: Bearer $token"`
2020
echo $me | jq
2121
```

0 commit comments

Comments
 (0)