Post on-prem migration - making hidden library columns visible - CanToggleHidden set to False

Andrew Warland 1 Reputation point
2026-08-03T09:07:11.2966667+00:00

I am working on multiple sites where content has been migrated from on-prem to online sites. In some of the site libraries, some columns are not visible in views in some libraries but do exist in others (mostly the generic Documents library). An export (using Get-PnPListItem) shows the columns exist and have (or have had, in the past) values assigned to them.

Using Get-PnPField -Identity "columnname" at the site level shows these columns are not hidden (Hidden is set to False) but at the library level using Get-PnPField -List $ListName -Identity "columnname", the same columns (with the same internal names and GUIDs) are hidden (Hidden is set to True).

The SchemaXML for the content types in which these columns exist all show that CanToggleHidden is set to FALSE for all of these columns and this setting is not changeable directly via PowerShell, although I have seen references to other ways to do this that I am not familiar with ('Reflection' was one option suggested).

The option Set-PnPField -List $ListName -Identity "columnname" -Values @{Required=$False;Hidden=$False} returns the error message 'Cannot change Hidden attribute for this field'. Similarly, 'Remove-PnPField -List $ListName -Identity "columnname" -Force returns 'You cannot delete a hidden column'.

There are only two ways I think this can be fixed:

  • Somehow in the Schema XML, change CanToggleHidden to TRUE, at least for long enough to fix the issue with the library versions of the columns.
  • Create a new library in the same site with the correct CTs added and copy everything there. Alternatively, put the correct CTs in the generic Documents library, copy everything there, then remove all CTs from the original library and put the content back.

Anyone have any other ideas?

Thanks!

Microsoft 365 and Office | SharePoint | Other | Windows
0 comments No comments

1 answer

Sort by: Newest
  1. Heimerdinger 295 Reputation points Independent Advisor
    2026-08-03T09:55:25.32+00:00

    Hi @Andrew Warland

    Thank you for posting your question in the Microsoft Q&A forum. 

    Based on your description where columns exist at the site level and show values in exports, but are hidden (Hidden = True) at the library level with CanToggleHidden = FALSE in the SchemaXML. The CanToggleHidden property controls whether the Hidden attribute can be changed, and when it is set to FALSE, PowerShell commands like Set-PnPField or Remove-PnPField will fail with errors such as "Cannot change Hidden attribute for this field" or "You cannot delete a hidden column." 

    Given that this scenario involves SchemaXML-level configurations that cannot be modified through standard PowerShell or UI operations, I recommend engaging Microsoft Support for further assistance. A technical support engineer can: 

    Investigate whether reflection-based approaches are viable in your specific SharePoint Online tenant 

    Verify backend configurations and run any required diagnostics 

    Provide guidance on whether the columns can be safely modified without data loss, or if a library migration approach is the most appropriate solution 

    The Global Admin should create a service request with Microsoft support for advanced technical assistance. For detailed instructions, please refer to Get support - Microsoft 365 admin.  

    As a fellow forum user, I don't have access to internal service logs, backend diagnostics, or engineering dashboards. Scenarios involving SchemaXML properties like CanToggleHidden typically require backend-level investigation that only Microsoft's support engineering teams can provide. 

    Thank you again for your time and understanding. I really appreciate your patience, and I'm here to help. Looking forward to your response. 


    Note: Please follow the steps in the forum documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.