In my .Net Core application I override AuthorizeAttribute. In OnAuthorizationAsync method I get the access token, I then call https://mytenant.auth0.com/userinfo?access_token=xyz to get user profile. Also when I redirect the user for authentication in my SPA, I use these settings scope: ‘openid last_password_reset email profile’. However GET on https://mytenant.auth0.com/userinfo?access_token=xyz is failing to return last_password_reset value. What am I missing? This is all I am getting
Thanks Dan. I tried creating a machine to machine api and issued the CURL call (the exact command given by Auth0) and I get “{“error”:“access_denied”,“error_description”:“Unauthorized”}curl: (6) Could not resolve host: application”
Very frustrating we have to go through so many hoops to get simple things done. Auth0 created a default Test application for access to management API and that is returning “unauthorized” too.
Sorry to hear your frustrations! It’s not a great experience to want to be able to do something and be blocked with errors. I have written a rule that will add a custom claim to your token. This is the easiest way I can think to get you the last pw reset information. Note: if a user has never reset their password this value will be undefined, and wont show up in a token!