Update 6.0 to 7.0 role-mapping to user error

Keycloak updated from version 6.0 to 7.0 version.
Getting 401 error while assigning the role to the user using the admin api
POST /{realm}/users/{id}/role-mappings/clients/{client}
Error : 401 unauthorized,

but it was working in previous version 6

any extra permissions needed to map roles for user using admin-cli user