3

I am getting this exception in my ASP.NET Core 2.1 app. What does it mean? My request to AAD was for both code and id_token. I successfully completed the OnAuthorizationCodeReceived handler and exchanged the code for an access token but the app throws the exception. Where do I even start debugging this?

Marc
  • 953
  • 7
  • 17
  • Can you show your code? You can also inspect the id token at https://jwt.ms to see if there is something odd. – juunas Oct 17 '18 at 05:48
  • 1
    Have you referred to https://stackoverflow.com/questions/45961781/asp-net-core-2-0-azuread-authentication-not-working? – axfd Oct 17 '18 at 05:53
  • 2
    I believe @axfd has already answered the question, but just to add my 2 cents. I had this same exception when integrating ASP.NET Core web app with Auth0 provider, using their basic code samples. It turned out I was doing `options.Scope.Clear()` without adding the desired scopes afterwards, which rendered the request invalid. – Mladen B. Jun 14 '19 at 07:53
  • Thank you @MladenB. ! Had the same issue, resolved with adding the correct scopes – newLoop May 19 '22 at 12:56

0 Answers0