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

Adding read:jira-user permission to our app not working

We just added the User REST API and it says its enabled and gives us the option to "Configure" but it doesn't seem to be working. I don't see a link for it in the Oauth screen and also get an error that it's not added when trying to get an oauth page configured with this scope.

Any ideas on how to fix this?

Screen Shot 2021-02-02 at 1.16.09 PM.pngScreen Shot 2021-02-02 at 1.16.01 PM.pngScreen Shot 2021-02-02 at 1.16.25 PM.png

1 answer

0 votes
Dario B Atlassian Team Feb 18, 2021

Hello @Alex Chumbley ,

I am not sure I understand 100% what you are doing/trying to achieve since the screenshots are apparently missing. Therefore, can you kindly let me know the following:

  1. Confirm this is for Jira Cloud
  2. Confirm the endpoint you are trying to use
  3. Confirm your app uses OAuth 2.0 authorization code grants (3LO) 
  4. Provide more details on what you have done, what is the expected result and what you get instead.

 

Also, for the future, please notice that this is not the best place to get help on development  related questions. The right resources are listed in https://developer.atlassian.com/resources. 

Specifically:

 

Cheers,
Dario

  1. Yes, this is Jira Cloud API
  2. I am running 
    /rest/api/2/issue/FAB-1014
     to get the comment data on a particular ticket, then I'm running 
    rest/api/2/user/accountId=
     in order to pull user details to understand who is being @mentioned in a comment (if there is an @mention in a comment)
  3. Yes, we are using OAuth 2.0
  4. The error message is { "errorMessages": [ "OAuth 2.0 is not enabled for this method." ] }


    Thank you!
Dario B Atlassian Team Feb 23, 2021

Hi @Alex Chumbley ,

One first thing I notice is that in your reply you say you are using:

rest/api/2/user/accountId=

Instead of:

rest/api/2/user?accountId=

 

Can you confirm you are using the correct endpoint? I believe you are, otherwise you should get 404 but I want to be sure.

Also, may I ask why you are using the REST API v2 instead of the v3? Are you maybe just using the 'latest' instead of the version number in the endpoint?

If that's the case, then you are most likely facing the below bug:

 

Finally, please notice that the endpoints you are using are part of the Jira Cloud Platform REST API, the User management ones are different  and are documented in the following page: https://developer.atlassian.com/cloud/admin/user-management/rest/intro/

 

Cheers,
Dario 

Hi Dario,

 

You're spot on, I needed to change it to

rest/api/2/user?accountId=

and no matter which version of the API I use (I've tried v2 and v3) I get the following error

{ "errorMessages": [ "Your app does not have scopes that are required to access this method ('read:jira-user')." ] }

 

This is exactly our problem. We've tried to add the scope `read:jira-user` to our app in the app console. But it's not updating our authorization URL, and we aren't receiving the scopes necessary to perform this query. This is what we are trying:

  1. Go to https://developer.atlassian.com/console/myapps/my_app_id/permissions
  2. User REST API is turned on, and we see "Configure" as the only option
  3. Clicking User REST API shows us that "View user profiles" is turned on
  4. We do not see the necessary scope (read:jira-user) in our OAuth authorization url

 

Are we missing something? Thank you!

Dario B Atlassian Team Feb 24, 2021

Hello @Alex Chumbley ,

I have never done this myself since usually this kind of issues are discussed in the Developers Community, however you might just be configuring the wrong resource, as mentioned in my previous reply:

Finally, please notice that the endpoints you are using are part of the Jira Cloud Platform REST API, the User management ones are different  and are documented in the following page: https://developer.atlassian.com/cloud/admin/user-management/rest/intro/

 

Therefore, can you kindly check if in the developer console you have added "view users profile" scope to the Jira Platform REST API as shown in below screenshots:

Jira-platform-rest-API.jpgJira-platform-rest-API-2.jpg

 

 

Cheers,
Dario

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Trello

📹 Favorite Trello templates

Hello Community!  My name is Brittany Joiner and I am a Trello enthusiast and Atlassian Community Leader. In this video, I'll share my favorite Trello templates. Templates mentioned in ...

99 views 5 7
Read article

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