I’m trying to get access to the roles of the users in a strapi system but no matter what I try it seems to return an empty array.
At the most basic, I’m sending a request using:
const users = await strapi.entityService.findMany(
'plugin::users-permissions.user',
{
populate: ["*"]
}
)
However, this just returns []
. I’ve tried with many different iterations of the above and I’ve also tried using db queries, similar to the below:
const usersDB = await strapi.db.query('plugin::users-permissions.user').findMany(
{
populate: ["*"]
}
)
Unfortunately, this also returns an empty array. Is there something I’m missing here?
This topic has been created from a Discord post (1264976718440173706) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord