Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Servicedesk September 21, 2019

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
DPKJ
Community Champion
September 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"
  ]
...
}
Servicedesk September 21, 2019

Scope is :

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

DPKJ
Community Champion
September 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 ?

Servicedesk September 21, 2019

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.

DPKJ
Community Champion
September 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

Servicedesk September 23, 2019

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