Last active
November 5, 2019 23:46
-
-
Save garrytrinder/0e606d2c3e48ddc4bf36b502ac884cff to your computer and use it in GitHub Desktop.
Calling the Microsoft Graph from PowerShell Core using Office 365 CLI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pwsh -NoLogo | |
o365 login | |
$token = o365 accesstoken get -r https://graph.microsoft.com --new | |
$request = Invoke-WebRequest -Uri https://graph.microsoft.com/v1.0/me -Headers @{"Authorization"="Bearer $token"} | |
$request.Content | ConvertFrom-Json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment