I got an access token using Oauth2 method IdentityModel package by connecting through Authority, Scope, ClientId, ClientSecret.
Now, trying to get the user details using API but it’s not working.
I added the the access token in request header too. Please let me know if I am missing anything here.
Hmm, I don’t see anything wrong with your request. The path looks right and matches the iss in your example token.
However, it looks like this Access Token was NOT granted the openid scope, so access to the Userinfo endpoint (part of the OIDC spec) would not be possible. What you have right now is an OAuth only Access Token, so OIDC endpoints like Userinfo will not work
Technically, you could use Resource Owner Password grant. The body for that request (to the /token endpoint) includes the username and password. Its not recommended for most use cases though.
Make sure you’ve enabled the “Interaction Code” grant type in Okta, both in your OIE org itself, for the OIDC application, AND (if you are using a Custom Authorization Server), the Authorization Server, as described here: Verify that the Interaction Code grant type is enabled | Okta Developer