Should return a contact object with a field stating whether the contact has a photo or not
however with contacts profilePhoto there are two separate endpoints:
return the photo itself in binary stream
returns metadata of the contact's photo - this is extremely useful for figuring out if that contact has a photo or not
by the way, supplying the above "$expand" option doesn't fail the API call, it will add the following header to the json response: "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('Email address removed')/contacts(photo())/$entity", however no field is added to the json object that could help us figure out if that contact has a photo or not.
There may be thousands of contacts in the account, if you want to list them all you don't need too many network calls as you can use:
with header: `Prefer=odata.maxpagesize=300`
but if you want to show photos of those contacts you can't do it for many contacts at once, if you use batches you can do up to 4 contacts at a time, which results in potentially thousands of API calls where most would probably return 404 since the contact doesn't have a photo. Adding the photo existence field using the $expand would solve this and allow us to reduce our API calls dramatically