Users/me is not returning relation field of type 'belong to many'?

I have created a relation between user and a collection type named Orders which is of “belong to many” type. And when i try to query users/me for related orders IDs then it returns nothing. How do i fix it?


We disable all relation population in /users/me unless you extend the users-permissions plugin, specifically this service:

This is done for performance reasons, you can see in that code sample that only role exists in the population array, just add the field name of the relation field you wish to populate. If you need to go deeper you can do something like:

['role', 'orders', 'orders.someNestedRelation']

See: Strapi plugins to see how to extend a plugin.