I'm writing a user to a SharePoint list.
I've read that the SharePoint User field has a string like this inside of it:
userId;#userLoginName
I've tried formatting in the same way when writing to a User field, for example when I write this string it works:
9;#i:0#.f|membership|ectropy@example.org
But what is strange (to me at least) is that 9;#
seems to work or even 9
. Even if I don't pass the userLoginName
info at all, the loginId
seems to be enough for it to recognize which User I'm talking about.
This seems to imply that when writing to the SharePoint User field, you only need the id, and the userLoginName
, or, indeed, everything after the loginId
is irrelevant.
Am I correct in my reasoning here? Or perhaps there's unexpected consequences if I leave off the userLoginName information?