I'm familiar with requesting a token in Az CLI -- az account get-access-token --resource-type ms-graph | ConvertFrom-Json
but I need this from the Azure PowerShell. I know you can request a REST API token via
$currentAzureContext = Get-AzContext
$profileClient = New-Object Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient([Microsoft.Azure.Commands.Common.Authentication.Abstractions.AzureRmProfileProvider]::Instance.Profile);
$UserToken = $profileClient.AcquireAccessToken($currentAzureContext.Subscription.TenantId).AccessToken;
But again, I need a Graph access token. Any way of doing this?