Obtaining an Access Token for Microsoft Graph using the Client Credentials grant and PowerShell with the Invoke-RestMethod cmdlet.

PowerShell Code