I found a solution in this: https://community.atlassian.com/t5/Jira-questions/Jira-Rest-API-How-to-get-a-List-of-Projects-for-a-specific-User/qaq-p/1670007.
But unfortunately, the findUsersWithAllPermissions API doesn't work.
Is there any other solution. Please let me know!