I am trying to set a user property (/rest/api/3/user/properties/?accountId=xxxxx) via the Jira Cloud REST API outside the connect app scope, but for the moment I get 401 unauthorized response.
What I am trying to accomplish is as follows:
- User clicks on connect to our service on an issue glance
- A window is opened where he logs into our system with his credentials (from our system)
- I send the context JWT (from Cloud app) as a parameter as well to the window (and on installed hook I save the tenant data as well to db)
- I use the clientKey (present in context JWT sent earlier) to retrieve tenant data from our db (validate token and generate a JWT token which I would use to set a user property (our API key) for the user by accountId
The documentation says that I am able to:
“Authorization” header value: "JWT " but I get unauthorized when I try to access the endpoint.
Any help would be appreciated!