I had to do this as well. My issue was I was importing a feature class with attachments and GlobalIDs already in place. I had to build a brand new feature class replicating the existing one. Then I needed to give it GlobalIDs, enable attachments and also enable archiving for the value to change to 'ApplyEdits with GlobalIDS : true'. After that was successful I appended my old data that I downloaded from AGOL into this new feature class.