How to obtain user info in Jira

Hello there!!

I’m currently new with all of the Atlassian Forge suite. I’ve been reading the documentation but it’s quite hard for me. So I was wondering if any good soul would help me understand how can I make an app (as I read, it should be a global app) that displays the current user information on Jira.

I mean, I know now how to create an app that appears on the Global page, but I’m currently blocked by not being able to get any of the user information (like name, mail and if possible, group in the organization).

Can someone please guide me on how I can achieve this? Can I achieve it by using an API? Do I have to do something extra on my console to allow the retrieving of this information?

Any help would be VERY appreciated!!!

Hi @JuanPabloCabrera

Actually, there’s a tutorial in our Forge Quest section of the docs which explains just how to do this!

It’s covered in the third part of this tutorial: Forge Quest: Build your first app

Hope this helps! If this has solved your question please mark it as the solution.

Cheers!
Mel

Hi Mel!

Thanks for taking the time to answer my question!

But I believe I gave the misleading impression it was for confluence! My question is actually intended for Jira!

Hey @JuanPabloCabrera ahh yep there’s a global page option for both Jira and Confluence so I wasn’t 100% sure. In any case, it works very similarly across Jira and Confluence.

Getting the user id for the current user will be the same as you’ll get the context information no matter which product you use.

In the tutorial it says to use requestConfluence - so you’d use requestJira instead.

And for the API call, you’d use the equivalent JIRA API call - https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-user-get

Let me know how you go.

Cheers!
Mel