title: AcquireTokenAsync not found for auth context when trying to get token
body: <p>I am trying to get the bearer token to call an API via a powershell script like so:</p>
  
  <pre><code>function GetAuthToken
  {
      param
      (
          [Parameter(Mandatory=$true)]
          $ApiEndpointUri,
  
          [Parameter(Mandatory=$true)]
          $AADTenant
  )
  $adal = "C:\Program Files (x86)\Reference Assemblies\Microsoft\WindowsPowerShell\3.0\" + `
              "Microsoft.IdentityModel.Clients.ActiveDirectory.dll"
  $adalforms = "C:\Program Files (x86)\Reference Assemblies\Microsoft\WindowsPowerShell\3.0\" + `
                  "Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll"
  
  [System.Reflection.Assembly]::LoadFrom($adal) | Out-Null
  [System.Reflection.Assembly]::LoadFrom($adalforms) | Out-Null
  
  $clientId = "1950a258-227b-4e31-a9cf-717495945fc2"
  $redirectUri = "urn:ietf:wg:oauth:2.0:oob"
  $authorityUri = “https://login.windows.net/$aadTenant”
  
  $authContext = New-Object "Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext" -ArgumentList $authorityUri
  
  
  
  $authResult = $authContext.AcquireTokenAsync($ApiEndpointUri, $clientId,$redirectUri, "Auto")
  $authResult.Wait();
  
  return $authResult
  $ApiEndpointUri = "https://management.azure.com/" #change this to graph api uri
  $AADTenant = 'GUID' #AAD tenant guid
  $token = GetAuthToken -ApiEndPointUri $ApiEndpointUri -AADTenant $AADTenant
  $header = @{
  'Content-Type'='application\json'
  'Authorization'=$token.CreateAuthorizationHeader()
  }
  
  $request = ``
  (Invoke-RestMethod -Uri $request -Headers $header -Method Get).value
  </code></pre>
  
  <p>However, acquiretokenasync is failing with this error:</p>
  
  <pre><code>Cannot find an overload for "AcquireTokenAsync" and the argument count: "4".
  </code></pre>
  
  <p>Any ideas why I am getting this issue? AcquireTokenAsync takes 4 arguments from what I know.</p>