Microsoft Graph PowerShell

The Microsoft Graph PowerShell SDK acts as an API wrapper for the Microsoft Graph APIs, exposing the entire API set for use in PowerShell.

Authentication

Refresh Token

Using TokenTactic

$secure_token = ((Invoke-RefreshToMSGraphToken -domain oilcorporation.onmicrosoft.com -refreshToken $(cat .\refresh_token.txt)).access_token | ConvertTo-SecureString -AsPlainText -Force)

Authenticate with Connect-MgGraph.

Connect-MgGraph -AccessToken $secure_token

Last updated