Take the last grant instead of the first in searches
Fix Client Credentials scope