How can i run Get-MgAccessToken in Powershell?

76 views Asked by At

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 ?

0

There are 0 answers