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

Unable to call Jira Rest Api as Add-on user and use overrideScreenSecurity

Hello guys,


We are developing a jira cloud app and We are facing an issue trying to update a custom field not in screen with parameter overrideScreenSecurity=true

Calling the URL  /rest/api/2/issue/'issueKey?overrideScreenSecurity=true throws the error below :

403 - only connect add-on users with admin scope permission are allowed to overwrite screen security.


Looking at this error message, we tried to call the api as the addon user (oAuth / jwt-bearer) but we are not able to connect :
The error message is : 
'Add-on \'addon-test-name\' disallowed to impersonate the user because \'no valid active user exists\'' }

However, the add-on user exists and is active.

Is that the way to connect as add-on user and to use overrideScreenSecurity?

 

Any help would be very much appreciated !

 

1 answer

0 votes
DPK J Community Leader Sep 21, 2019

@Sebastien De Luca

First and foremost I would like to know what does your JSON descriptor file (atlassian-connect.json) looks like for value "scopes" look like.

You need to  "ADMIN" in "scopes" value set,

{
...

  "scopes": [
    "ADMIN"
  ]
...
}

Scope is :

 "scopes"[       "ADMIN","PROJECT_ADMIN","ACT_AS_USER"       ],

DPK J Community Leader Sep 21, 2019

@Sebastien De Lucayour scopes seems to correct. Have you reinstalled addon after changes in scopes, and the user through which you are accessing api is site-admin/jira-administrator ?

Yes, I did that.
The first error message says I need to connect with add-on user


As my understanding, I should use this add-on user (plugin_name) for authentication and api request, but I am not able to authenticate.

The error message is : 
'Add-on \'addon-test-name\' disallowed to impersonate the user because \'no valid active user exists\'' }

And with a cloud user who is site-admin, always the same error :
403 - only connect add-on users with admin scope permission are allowed to overwrite screen security.

DPK J Community Leader Sep 22, 2019

@Sebastien De Luca  if uninstalling and disabling addon and reinstalling it is not helping, I suggest you take a look at this developer community question and contact Atlassian support, it seems your site might have some problem

https://community.developer.atlassian.com/t/atlassian-addons-admin-group-and-how-its-created-managed/1707/2

Behavior is weird, I have created a support ticket, waiting for their feedback.

Any other thoughts are more than welcome.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

334 views 1 3
Join discussion

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