I am trying to run the following
$token = Get-MgAccessToken -ClientId $clientId -ClientSecret $clientSecret -TenantId
$tenantId
but it gives the error: The term 'Get-MgAccessToken' is not recognized as the name of a cmdlet. I have ran the following: Install-Module -Name "Microsoft.Graph"
Is there a different module i need to install ? How can i get this to run successfully ?