title: Error (403 Forbidden) when calling Graph Api from powershell
body: <p>I'm trying to call Graph API from PowerShell using Invoke-RestMethod to get a list of Groups.
      I registered my application. I have the secret string. I added Graph permissions. When I do the call
      I always get the 403 Forbidden error. I probably missing some some other configuration, but I can 
      figure out what is it. Any help would be much appreciated.</p>
  
  <pre><code>Here is how I configured Microsoft Graph permissions:
  API / Permissions name      Type        Admin Consent
  Group.Read.All          Application     Yes
  Group.ReadWrite.All     Application     Yes
  Group.Selected          Application     Yes
  
  
  Here is how I make the call:
  
  $token = Get-PnPAccessToken
  $Header = @{
     'Content-Type'  = 'application\json'
      'Authorization' = 'Bearer ' + $token
  }
  $url = "https://graph.microsoft.com/v1.0/groups"
  Invoke-RestMethod -Uri $url -Headers $Header -Method Get -ContentType 'application/json'
  </code></pre>
  
  <blockquote>
    <p>Error message that I'm getting:  Invoke-RestMethod : The remote server
    returned an error: (403) Forbidden.</p>
  </blockquote>