Multiple groups for user assigned to same application is not coming from OKTA API for application

Get User ID :
http://domain/api/v1/users?q=xyz@xyz.com

This will return user id

Now I want all groups for this user assign to application.
http://{domain}/api/v1/apps/{application ID}/users/{userID}

This same user is in more that one group and both the groups assigned to application. It’s returning only one group.