No user found when using REST API

When I use a REST route whilst logged in, and call wp_get_current_user(), no user is found. However, the request method, eg POST is processed without issue. Example REST route registration.

Call to wp_get_current_user() returns this user object:

i.e no user. If a permission callback is added e.g. `

A 401 status is returned with the message “Sorry, you are not allowed to do that”.

I would appreciate it if anyone knows what I might need to do in order for wp_get_current_user() to return the current user in a REST call.