Issue calling admin rest APIs in Latest Keycloak version

we were using keycloak version ‘11.0.2’, and we need to request group details from a user using Keycloak rest API. We have generated token using API endpoint
/auth/realms/{realm}/protocol/openid-connect/token and added the role ‘query-groups’ from realm-management client to achieve it. But when we migrated to latest version(22.0.5), adding the same role to a user is not providing us the permission to request the rest API(/auth/admin/realms/{realm}/groups) to get back group details. when checked, its happening for all the admin APIs.