Hi Patrick Poynter,
Thank you for reaching out, Microsoft!
The error you are getting is only returned when the user has not updated profile photo or if user does not exist. Please ensure you are passing correct UPN in URL. Also, for some users email and UPN can be different so please check you are using user's UPN as profilePhoto Doc mentions to use UPN or ID to fetch profile photo. Also please ensure you provide ProfilePhoto.Read.All permission to access photo. Please refer below screenshots:
1 /user showing users email and UPN are different:
- fetching photo with UPN:
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.