title: Request_ResourceNotFound calling /v1.0/me
body: <p>The following GET request works, which shows that my AccessToken is valid and that my application has correct permissions to access user information using the Microsoft Graph API:</p>
  
  <pre><code>GET https://graph.microsoft.com/v1.0/users/
  Authorization: Bearer &lt;my_access_token&gt;
  </code></pre>
  
  <p>However, the following GET request does not work and returns the error message:</p>
  
  <pre><code>GET https://graph.microsoft.com/v1.0/me/
  Authorization: Bearer &lt;my_access_token&gt;
  
  {
      "error": {
          "code": "Request_ResourceNotFound",
          "message": "Resource '&lt;my_resource_id&gt;' does not exist or one of its queried reference-property objects are not present.",
          "innerError": {
              "request-id": "&lt;my_request_id&gt;",
              "date": "2018-01-26T06:24:27"
          }
      }
  }
  </code></pre>
  
  <p>I am certain that the resource (an "Enterprise Application" object created in my Azure Active Directory B2C instance) <strong>does</strong> exist because I can find it in portal.azure.com and because the first GET request used that same resource and returned successfully.</p>
  
  <p><strong>My question is: Why can't I access "me" but I can access a list of users?</strong></p>
  
  <p>Both of the GET requests above are run after I have successfully authenticated into my ASP.NET version 4.71 MVC. Could it be an issue with the way I am saving the authenticated user's information in a cookie? Here is the code for this:</p>
  
  <pre><code>public partial class Startup
  {
      private static string clientId = ConfigurationManager.AppSettings["ida:ClientId"];
      private static string appKey = ConfigurationManager.AppSettings["ida:ClientSecret"];
      private static string aadInstance = ConfigurationManager.AppSettings["ida:AADInstance"];
      private static string tenantId = ConfigurationManager.AppSettings["ida:TenantId"];
      private static string postLogoutRedirectUri = ConfigurationManager.AppSettings["ida:PostLogoutRedirectUri"];
  
      public static readonly string Authority = aadInstance + tenantId;
  
      // This is the resource ID of the AAD Graph API.  We'll need this to request a token to call the Graph API.
      string graphResourceId = "https://graph.windows.net";
  
      public void ConfigureAuth(IAppBuilder app)
      {
          ApplicationDbContext db = new ApplicationDbContext();
  
          app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);
  
          app.UseCookieAuthentication(new CookieAuthenticationOptions());
  
          app.UseOpenIdConnectAuthentication(
              new OpenIdConnectAuthenticationOptions
              {
                  ClientId = clientId,
                  Authority = Authority,
                  PostLogoutRedirectUri = postLogoutRedirectUri,
  
                  Notifications = new OpenIdConnectAuthenticationNotifications()
                  {
                      // If there is a code in the OpenID Connect response, redeem it for an access token and refresh token, and store those away.
                     AuthorizationCodeReceived = (context) =&gt; 
                     {
                         var code = context.Code;
                         ClientCredential credential = new ClientCredential(clientId, appKey);
                         string signedInUserID = context.AuthenticationTicket.Identity.FindFirst(ClaimTypes.NameIdentifier).Value;
                         AuthenticationContext authContext = new AuthenticationContext(Authority, new ADALTokenCache(signedInUserID));
                         AuthenticationResult result = authContext.AcquireTokenByAuthorizationCode(
                         code, new Uri(HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Path)), credential, graphResourceId);
  
                         string token = result.AccessToken;
  
                         return Task.FromResult(0);
                     }
                  }
              });
      }
  }
  </code></pre>
  
  <p>What have I done incorrectly? Thank you!</p>