Not able to transition issue using REST API(using JWT authentication)

I am trying to change issue status in JIRA cloud using rest API.
I am making a post request to /rest/api/2/issue/<ISSUE-KEY>/transitions with the body as

	"transition": {
    	"id": "21"

Here, "id" : "21" is the id of the status I want to change to. I am able to do it via Basic Authentication but not via JWT authentication in connect apps(It says 401 : Unauthorized). I have tried putting all the scopes in the app descriptor but still it’s not working. Any leads would be appreciated.