I am trying to put a default user into a People or Group data type into a SharePoint Online list. Is this possible using CSOM or the XML definition?
This is what i have tried: -
XML
<Field DisplayName="People" Name="theField" StaticName="theField" Type="User" UserSelectionMode="PeopleOnly"
ID="{63FD2388-BA5E-4BE4-B2BE-9406B02FD7D3}" Required="FALSE" Group="Group">
<Default>1;#Joe Bloggs</Default>
</Field>
CSOM
Microsoft.SharePoint.Client.User usr = clientContext.Web.EnsureUser(@"JoeBloggs");
clientContext.Load(usr);
clientContext.ExecuteQuery();
FieldUserValue defValue = new FieldUserValue();
defValue.LookupId = usr.Id;
theField.DefaultValue = defValue.ToString();
theField.Update();
Both tests make the field do this
Is this possible?
Thanks