Set-MgUserPhotoContent is returning to the host before it has completed the Graph API to upload the photo file. I'm using Set-MgUserPhotoContent in a script in a try block where the very next line is ...