title: Microsoft Graph - GraphServiceClient error
body: <p>I'm trying to get a users member of from Azure AD using Microsoft Graph's api. I have the following code...</p>
  
  <pre><code>        {
              try
              {
                  var credential = new ClientCredential(Settings.AzureADAuthenticationSettings.ClientId, Settings.AzureADAuthenticationSettings.ApplicationKey);
                  var authContext = new AuthenticationContext(string.Format(Settings.AzureADAuthenticationSettings.AuthorityUrl, Settings.AzureADAuthenticationSettings.TenantId));
                  var code = ValidationHelper.GetString(context.Request.Params["code"], string.Empty);
                  var result = await authContext.AcquireTokenByAuthorizationCodeAsync(code, new Uri(context.Request.Url.GetLeftPart(UriPartial.Path)), credential, string.Format(Settings.AzureADAuthenticationSettings.GraphUrl, ""));
                  //var adClient = new ActiveDirectoryClient(new Uri(string.Format(Settings.AzureADAuthenticationSettings.GraphUrl, result.TenantId)), async () =&gt; await GetAppTokenAsync(result.TenantId));
                  var adClient = new GraphServiceClient(string.Format(Settings.AzureADAuthenticationSettings.GraphUrl, result.TenantId),
                      new DelegateAuthenticationProvider(async requestMessage =&gt; {
                          var token = await GetAppTokenAsync(result.TenantId);
                          requestMessage.Headers.Authorization = new
                              AuthenticationHeaderValue("bearer", token);
                      }));
                  //var adUser = (User) await adClient.Users.Request().Filter($"UserPrincipalName eq '{result.UserInfo.DisplayableId}'").Expand("MemberOf").GetAsync();
                  var adUser = await adClient.Me.Request().Expand("MemberOf").GetAsync();
  </code></pre>
  
  <p>When the last line executes, I get the following error:</p>
  
  <pre><code>Message: Method not found: 'System.Threading.Tasks.Task`1&lt;!!0&gt; Microsoft.Graph.BaseRequest.SendAsync(System.Object, System.Threading.CancellationToken, System.Net.Http.HttpCompletionOption)'.
  
  Exception type: System.MissingMethodException
  Stack trace:
  at Microsoft.Graph.UserRequest.d__6.MoveNext()
  at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine&amp; stateMachine)
  at Microsoft.Graph.UserRequest.GetAsync(CancellationToken cancellationToken)
  at Microsoft.Graph.UserRequest.GetAsync()
  at AzureADAuthentication.Handlers.AzureADAuthenticationHandler.d__0.MoveNext() in
  </code></pre>
  
  <p>Any help would be much appreciated!</p>