title: Invalid resource error after following the azure AD angularJS to dotnet web api guide (description:AADSTS500011)
body: <p>I have been following after this guide step by step:
  <a href="https://github.com/Azure-Samples/active-directory-angularjs-singlepageapp-dotnet-webapi" rel="nofollow noreferrer">https://github.com/Azure-Samples/active-directory-angularjs-singlepageapp-dotnet-webapi</a></p>
  
  <p>The only thing that I didn't do (not sure if its related) is the following line:</p>
  
  <p>"Also in the ToGoAPI project, open the file Controllers/ToGoListController.cs. In the [EnableCors...] attribute, enter the location of the To Do SPA client. By default it is <a href="https://localhost:44326" rel="nofollow noreferrer">https://localhost:44326</a>. Make sure to omit the trailing slash.
  "</p>
  
  <p>The reason I didn't do it is simply because I can't find any [EnableCors...] in the code. I did try to enable CORS in a different way though. following this:</p>
  
  <p><a href="https://docs.microsoft.com/en-us/aspnet/web-api/overview/security/enabling-cross-origin-requests-in-web-api#enable-cors" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/aspnet/web-api/overview/security/enabling-cross-origin-requests-in-web-api#enable-cors</a></p>
  
  <p>Anyway, I get the following error:</p>
  
  <p>"Error :invalid_resource
  adal.js:973 Error description:AADSTS500011: The resource principal named <a href="https://yorecisraportsco.onmicrosoft.com/ToGoAPI" rel="nofollow noreferrer">https://yorecisraportsco.onmicrosoft.com/ToGoAPI</a> was not found in the tenant named yorecisraportsco.onmicrosoft.com. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You might have sent your authentication request to the wrong tenant.
  Trace ID: 64213edc-4b12-4caa-aa4e-b9ec82bd3000
  Correlation ID: 607d25c1-d915-46eb-ba48-67adb70ddab8
  Timestamp: 2019-03-04 12:41:33Z"</p>
  
  <p>I am not sure why this is happning as I followed the guide - configured everything in Azure like it said and also configured it in the code.</p>