Not able to get current logged in user account id

Hello,

I need current logged in user account id. So, I tried to call REST API “/rest/api/3/myself” to get current user from my connect application (written in asp.net core) for authentication I created JWT and it has following info:

iss:<my-connect-app-key>,
aud:<clientkey-saved-from-handshake>,
iat:<current-time>,
exp:<current-time+15minutes>,
qsh:<encoded-qsh> decoded-form=“GET&/rest/api/3/myself&”

I logged in with 2-3 different accounts to check into but every time I got same user info, the user info display name is showing my app name. Not sure what I’m doing wrong.

Thanks

Hello again @MikeDev. Thanks for your persistence in figuring out Atlassian Connect in ASP.NET.

The response you are getting is the expected response. Your app has a user, and when it creates a JWT, myself is the app. But I do understand what you are trying to do. There are 2 options: