Microsoft Graph - User photo : Microsoft.Fast.Profile.Core.Exception.ImageNotFoundException

I am trying Microsoft Graph in a personal project to learn about it. I have an Application and secret registered in Azure. This Application contains the following permissions at Application level: User.Read.All, User.ReadWrite. All these permissions are approved by admin and are enabled.

enter image description here

I generate a token to use combined with Bearer in Authorization header. I generate the token using the ApplicationId and Secret and I use this token to call Graph API(beta and also 1.0). This token works as I can see the information from Users. However, when I try to call /users/{Id}/photo/$value in Beta Api, it always returns:

"error": {
    "code": "ImageNotFound",
    "message": "Exception of type 'Microsoft.Fast.Profile.Core.Exception.ImageNotFoundException' was thrown.",

If I use my account(delegated) to authenticate and call to get my photo: Endpoint: /me/photo/$value the photo is returned. However at Application level endpoint (/users/{Id}/photo/$value) it doesn't work. Consider Application level calls a different endpoint (/users/{Id}/photo/$value) using the user Id to get the photo. As you can see the permissions are enabled and configured for AppId and Secret used to generate the token in Azure.

Would you know if I need to setup anything additional? At Application level anything additional should be considered?

Any help will be appreciated.


I was able to resolve this by editing the user in Azure AD (not by editing your profile):

Users

Click on the user you want to edit:

Edit User

Upload a photo for the user:

Click Edit and upload a photo