Here's a little code snippet that worked for me:
FileStream fileStream = new FileStream(@"", FileMode.Open, FileAccess.Read);
try
{
userToBeAdded.ThumbnailPhoto.UploadAsync((Stream) fileStream, "application/image").Wait();
Console.WriteLine("\nUser {0} was updated with a thumbnailphoto", userToBeAdded.DisplayName);
}
catch (Exception e)
{
Console.WriteLine("\nError Updating the user {0} {1}", e.Message,
e.InnerException != null ? e.InnerException.Message : "");
}
Should one use User.SetExtendedProperty? 1.2 had this?