Non logged in user ID

System Information
  • Strapi Version: 3.6.8
  • Operating System: Mac OS (not m1)
  • Database: default
  • Node Version: 14.18.3 (local) v16.13.1 Global
  • NPM Version: 8.1.2
  • Yarn Version: 1.22.17

Hi There,
Im hoping someone here can help me out.
I have a particular use case where an admin (logged in user) needs to allocate bookings to other users.
I have a bookings collection, with a field that has a relationship to users-permissions-user.
Using the api, when I pull the all the users, I get every field, except the ID field needed to link the booking to the user.
so far, I have tried

  • building a custom controller, with the same result - Strapi never sends the ID.
  • I have added an ID model -which causes Strapi to throw an error as ID is a protected field.
  • I have created a new UID field in users, but that can’t be set to auto increment so is next to useless.

I realise that this is an unsual use case, but there must be a way to either make strapi return the ID of an object along with the rest of its data, or create a relational field that will act in the same way.
This would be so easy in vanilla mySql…

Any help / pointers would be appreciated.

Many thanks

A