title: Get current user more information
body: <p>I am using <code>.NET Core</code> with <code>C#</code> application and there I have integrated the Azure AD authentication. It means any Azure AD user can be logged in to this application. Now at someplace, I want to display the City, State, Country and some other fields value of current logged in user. For that, I have used <a href="https://docs.microsoft.com/en-us/graph/overview" rel="nofollow noreferrer">Microsoft Graph API</a>, but I am not able to get the details successfully. I got an error <code>Request_ResourceNotFound</code>. I used below <code>C#</code> code to get the data for current Logged in user.</p>
  
  <pre><code>var clientId = "&lt;CLIENT_ID&gt;"; // I have used my application client id here
  var secret = "&lt;CLIENT_SECRET&gt;"; // I have used my client secret here
  var domain = "&lt;DOMAIN&gt;"; // I have used domain here
  var credentials = new ClientCredential(clientId, secret);
  var authContext = new AuthenticationContext($"https://login.microsoftonline.com/{domain}/");
  var token = await authContext.AcquireTokenAsync("https://graph.microsoft.com/", credentials);
  
  var graphServiceClient = new GraphServiceClient(new DelegateAuthenticationProvider((requestMessage) =&gt;
  {
      requestMessage
          .Headers
          .Authorization = new AuthenticationHeaderValue("bearer", token.AccessToken);
  
      return Task.CompletedTask;
  }));
  
  var user = await graphServiceClient
      .Me
      .Request()
      .GetAsync(); // Error at this line
  </code></pre>
  
  <p>But it throws an below error when I used <code>graphServiceClient.Me.Request().GetAsync()</code></p>
  
  <blockquote>
    <p>Error: Code: Request_ResourceNotFound</p>
    
    <p>Message: Resource 'XXXX-XXXX-XXX-XXXX' does not exist or one of its queried reference-property objects are not present.</p>
  </blockquote>
  
  <p>Have anyone faced this kind of error earlier, Can anyone suggest how to get the data for currently logged-in User using Microsoft Graph in C#?</p>