active-directory-b2c-dotnetcore-webapi icon indicating copy to clipboard operation
active-directory-b2c-dotnetcore-webapi copied to clipboard

ID_Token returned doesn't authenticate with API calls

Open TravisLRiffle opened this issue 6 years ago • 2 comments

I get a 401 unauthorized when I try to call my API built from this code. I (login) to get a id_token, but I am wondering if this should be an "access_token" or if the id_token will suffice. Like to hear your thoughts.

TravisLRiffle avatar Feb 17 '20 22:02 TravisLRiffle

@TravisLRiffle The id_token is for the client (web app) and has claims about the user. You need to use the access token with the protected resource (web API). that's why you're getting unauthorized. Try this newer web app calls web api with b2c sample...appologies for not seeing this question sooner. cc: @jmprieur

jennyf19 avatar Apr 28 '20 01:04 jennyf19

Closing as this sample is being archived in favor of a better sample

jmprieur avatar May 28 '20 18:05 jmprieur