Hello @Muhammad Hussain ,
When you update any user's photo directly using PowerShell , you are setting the user's thumbnailphoto
attribute directly for the cloud so source of authority for the thumbnailphoto
attribute is the cloud system and once you make this change the photo/thumbnail attribute for the user can only be changed from the cloud or by Excnage PowerShell. However when you update it from on-prem AD by any tool , you are changing the attribute onpremise and waiting for the changes to sync to the cloud through Azure AD connect . As per the article :- https://support.microsoft.com/en-in/help/3062745/user-photos-aren-t-synced-from-the-on-premises-environment-to-exchange
The thumbnailPhoto attribute is synced only one time between Azure AD and Exchange Online. Any later changes to the attribute from the on-premises environment are not synced to the Exchange Online mailbox.
This is by design and I would suggest to directly let the user update the photo from the cloud as it is easier to manage. So either you can use the powershell , or let the user update the same from OWA or MS Teams etc. But once this is done, the exchange online system becomes the source of authority for photo/thumbnail for the user and it can not be updated from on-premise.
I have not tried this as I do not have an exchange hybrid lab setup however you can try to remove the photo record by using the Powershell cmdlet Remove-UserPhoto -Identity EMAILID -ClearMailboxPhotoRecord
and see if that clears the source of authority to Null so that the cloud object can now take updates from on-premise once again. And we also need to keep in mind that this is again one time change. I am not sure if this works but I am making a guess on this. I am hoping that you would be able to check this easily as you have this environment.
Hope the above explanation helps. In case the information provided in this post helps, please do accept the post as answer . If you have any residual queries on this, please feel free to ask and we will further try to clarify your queries.
Thank you.