there are several solutions that I found:
1. Give the webservices login account admin rights, you then get all the fields
2. You can get some fields by turning them on in the profile, email for example
It seems hit and miss to find out what fields you can get, not sure why you would restrict them but I guess its part of the bigger permissions picture.
The searching needs to have these fields enabled as well, so if you want to search by username then you must have this field returned as well. the only way I found of getting/searching by username for example was to give the web service account admin rights which seems a bit overkill!
I am trying to pull user details using core_user_get_users, using email and id it's working OK, but how to use it if I have a additional field "Person No | personno"?
Getting user details by email address: OK
Getting user details by id: OK
But how to get user details using below optional field/User profile fields| Additional Information? => Person Number/personno with value of 210792
Yes, this is the solution. Thank You! Give the capacity "Moodle/user:viewalldetails" to the rol of web services.