Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Getting the current user from Jira Cloud Edited

Hi everyone,
I want to get the information about the current logged-in user of the Jira cloud addon.
the docs suggested the /myself endpoint for this situation, but the problem is this endpoint only returns the information about the user who it's api_token is used in the app, not the user who is logged-in to the app via his/hers dashboard.

How can I do this?

 

thank you in advance

1 answer

0 votes
Andy Heinzer Atlassian Team Jan 12, 2021

Hi Shahryar,

I understand you are creating an app for Jira Cloud.  However authentication is done differently depending on what exactly you are building.  From the way you have described this, it sounds like you're using basic auth.  If that is the case, your app can then only authenticate as the user that has supplied their API token to your app. 

Please take a look over at https://developer.atlassian.com/cloud/jira/platform/security-overview/ It explains the different methods of managing authentication depending on the type of app you are creating.  To meet your needs here, you will likely need to implement OAuth 2.0 in your app (provided this is not a Forge or Connect app, those frameworks have other existing means to manage this).  More details on that method can be found over in https://developer.atlassian.com/cloud/jira/platform/oauth-2-3lo-apps/ .

I hope this helps.

Andy

Thank you very much for your response.

I'm using ACE actually, Can I use OAuth 2.0 with it?

Andy Heinzer Atlassian Team Jan 13, 2021

Ah, in that case, please see Security for Connect apps.  For Connect apps, you can use two different forms of Authorization: Authorization via scopes and app users or Authorization with user impersonation.  The latter form does use a JWT bearer token which uses OAuth 2.0.  More details on that over in User impersonation for Connect apps.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you