How i can change a site column internal name

Steel Contributor

I have the following CSOM code to update a field internal name:-

 

 

using (ClientContext context = new ClientContext("https://*****.sharepoint.com/sites/Intranet/"))
            {
                try
                {
                 context.Credentials = new SharePointOnlineCredentials("***@***.onmicrosoft.com", passWord);
                 var a =  context.Site.RootWeb.Fields.GetByInternalNameOrTitle("Confidentiality_x0009_");
                 a.InternalName = "Confidentiality";
                 a.Update();
                 a.UpdateAndPushChanges(true);

 

 

 

but i am getting this error:-

 

Error   CS0200  Property or indexer 'Field.InternalName' cannot be assigned to -- it is read only

 

so can anyone advice if there is a way using CSOM or PnP to update an internal column name?

1 Reply
No, unfortunately this can't be done as far as I'm aware