Most libraries moved from a file server to SharePoint bring the old folder tree as it is: Quality/Procedures/2024/Production/Line 3/Approved. Nobody complains in the first weeks, because the structure is familiar. The problem starts when search, filtering, retention labels and automation come into play; the folder stands like a wall in front of each one. Below, we explain how to set up classification with site columns, content types and managed metadata (the term store), which information stays in folders and which moves to metadata, and the order for moving away from the existing tree.
Where the folder structure gets stuck
A folder classifies a document along a single axis. If a procedure belongs to the “Production” department, “Line 3” and the “OHS” topic at the same time, you can choose only one of them in the folder. The other axes are carried either by duplicate files or by users’ memory. Memory doesn’t scale. In the field we come across the same symptoms every time:
- Single-axis finding: A view such as “current instructions from all departments” can’t be built in a folder structure.
- Path length: In SharePoint Online, the decoded path including the file name shouldn’t exceed 400 characters. Deep folders and long file names approach this limit quickly; the sync client and desktop apps often fail earlier.
- Moving cost: When a department name changes, the folder is renamed; links given to the document and path definitions in flows can break.
- Automation difficulty: For Power Automate or retention labels, the answer to “what is this document?” has to be parsed out of the folder name. When the folder name changes, the flow silently works wrong.
This doesn’t mean banning folders. For a permission boundary or a small, permanent grouping, a folder is still the right tool. The job is to take the classification information out of the folder name and move it into queryable fields.
Site columns, content types and the term store
Metadata design is built from three building blocks. If the differences aren’t clear, definitions are made in the wrong layer and ten different “Department” columns appear in ten libraries:
| Structure | Scope | What for |
|---|---|---|
| List column | A single library | A field specific to that library only |
| Site column | The site and its children | A field used with the same definition in several libraries |
| Content type | Site or content type gallery | A document class’s column set, template and behavior |
| Term store | Tenant-wide | Hierarchical, centrally managed terms |
A content type is the definition “this is a procedure, and a procedure has these fields”. For example, a “Controlled Document” content type carries the Document Type, Process Owner, Effective Date and Revision fields. Other content types such as “Form” and “Record” can sit in the same library; each shows its own set of fields. Content types to be used tenant-wide are defined in the content type gallery in the SharePoint admin center and published to sites.
Managed metadata (the term store) consists of hierarchical lists whose values are managed centrally: term group → term set → term. Under a “Location” term set, a hierarchy such as “Gebze > Line 1, Line 2” is defined. When a term is renamed, documents using that term show the current name; the change is reflected in SharePoint intranet sites with a short delay through a background sync job. If you change a value in a choice column, existing items keep the old value. That’s the difference.
A simple rule: if the value list is in a single library and fixed, use a choice column; if it’s used on several sites, is hierarchical or contains synonyms, use managed metadata; if the values are records from another list (for example a supplier list), use a lookup column.
Folder or metadata: a decision table
Put this table on the table when discussing which information is kept where:
| Details | Recommended place | Reason |
|---|---|---|
| A different access group | A separate library or folder | Makes managing the permission boundary easier |
| Department, process | Managed metadata | Consistency across libraries |
| Document type | Content type or choice column | Determines the field set and template |
| Year, period | Date column | Filterable and sortable |
| Project, customer | Lookup column or metadata | The master record is kept in another list |
| Document set (a file’s attachments) | Document set or folder | A package managed together |
If you create a separate library instead of a folder for content with different permissions, permissions are managed at the library level; this is much more visible and auditable than folder-level permissions with broken inheritance. The details are in the SharePoint permission model guide.
Default values and required fields
Most metadata projects collapse in the same place: users are expected to fill in five fields on every upload. A month later half the fields are empty and the rest say “Other”. Ways to reduce the burden of filling them in:
- Column default values: Defaults are assigned per folder with “Column default value settings” in the library settings. Every file uploaded to the “Gebze” folder automatically gets the Location value “Gebze”. This is the most useful interim step in moving to metadata without removing the folder right away.
- Template by content type: A document created from the “New” menu starts with the right content type and template.
- Limit required fields: Make the two or three fields that will really be used in filters, retention or automation required. Files missing a required field are flagged in the modern interface with a “required info missing” warning; if check-out is required in the library, the file may stay checked out until the missing field is completed, and others can’t see the current version.
- Automatic filling: Fields such as Process Owner can be derived from a master list with Power Automate.
Views, filters and the list view threshold
Views are where metadata pays off. A “Current procedures” view is defined with the filter Content Type = Controlled Document and Status = Current, grouped by Department. During the transition, the “show items without folders” option lets you see files in folders as a flat list.
In a large library, the list view threshold comes into play. In SharePoint Online a library can hold millions of items; but if a single view query needs a scan exceeding 5,000 items, the operation is blocked. The threshold isn’t a storage limit but a query limit. Users report it as “the library won’t open”; the first places to look are the view’s first filter and whether that column is indexed. Check order:
- Index the filtered columns: From the “Indexed columns” section in the library settings, index the columns used as the first filter in views. A list can carry at most 20 indexes; creating an index before the list exceeds the threshold is the smoothest path, and creating an index on a large list can take time in the background.
- Make the first filter selective: The view’s first filter should reduce the result set below 5,000. If “Status = Current” alone exceeds 5,000, the Department filter comes first.
- Watch grouping: Grouping and sorting by a non-indexed column can produce errors in a large library.
- Search and the filter pane: In very large libraries, directing users to the search results page or the filter pane instead of views scales better.
The same threshold also affects delegation decisions in Power Apps apps; if you’re thinking of making the list an app’s data source, see the Dataverse vs SharePoint list comparison.
The order for moving away from the existing folder structure
In corporate Microsoft 365 and intranet projects, moving from folders to metadata isn’t done in one go. If it’s done in one go, there’s no way back either. The order we follow:
- Inventory: Extract the folder tree and file counts. Label which information each folder level represents (department, year, status).
- Model: Design the site columns, content types and term sets. Term sets are created centrally in the term store.
- Mapping table: Keep the folder path → metadata value mapping in a CSV.
- Bulk metadata assignment: Write the values to the files with PnP PowerShell; then flatten the folders or keep only those that are permission boundaries.
- Views and training: Publish the new views; show users the filter pane instead of folders.
A PnP PowerShell example of the model setup is below. The site address and names are examples; the commands create a site column, add it to a content type and attach the content type to the library:
Connect-PnPOnline -Url https://contoso.sharepoint.com/sites/quality -Interactive `
-ClientId <app-registration-client-id>
Add-PnPField -DisplayName "Document Type" -InternalName "DocumentType" -Type Choice `
-Group "Corporate Columns" -Choices "Procedure","Instruction","Form"
$parent = Get-PnPContentType -Identity "Document"
Add-PnPContentType -Name "Controlled Document" -Group "Corporate Content Types" -ParentContentType $parent
Add-PnPFieldToContentType -Field "DocumentType" -ContentType "Controlled Document"
Add-PnPContentTypeToList -List "Documents" -ContentType "Controlled Document"
In bulk assignment, a term path can be used for a managed metadata column:
Set-PnPListItem -List "Documents" -Identity 128 `
-Values @{"DocumentType"="Procedure"; "Location"="Corporate|Location|Gebze"}
The mistake we see most often in the field is in internal names. If the InternalName contains Turkish characters and spaces, SharePoint generates an encoded name (such as _x00dc_), and reading it in automation becomes torture. Always give the internal name in ASCII without spaces. Current versions of PnP PowerShell no longer use the shared multi-tenant app registration; you need to create your own Entra ID app registration in your tenant and specify it with -ClientId (Register-PnPEntraIDAppForInteractiveLogin creates this registration; verify the cmdlet name in the documentation of the version you use). When values are written, the “Modified By” and “Modified” fields are updated. On the audit side, record this bulk change as a migration operation.
The infrastructure plan for the file server migration stage is handled separately: a migration plan from file servers to SharePoint and OneDrive. For the conceptual basis of managed metadata, Microsoft’s managed metadata documentation is the official reference. When setting up controlled document libraries, our SharePoint document and revision management service covers this model together with versioning and approval settings; the details of versioning settings are in the document revision management guide.
Frequently asked questions
Do folders need to be removed completely?
No. Folders still work as a permission boundary or for small packages managed together. The goal is to take the classification information out of folder names and move it into filterable columns.
Should I use a choice column or managed metadata?
If the value list is used in a single library and rarely changes, a choice column is enough. For values shared across several sites, hierarchical values or values likely to be renamed, choose managed metadata.
Does the 5,000-item threshold mean a library can hold at most 5,000 files?
No. The threshold is a query limit, not a storage limit. A library holds far more items; you need to design views with indexed columns and a selective first filter.
How is metadata assigned to existing files in bulk?
The mapping between folder path and metadata value is prepared in a CSV file and written to the files with the PnP PowerShell Set-PnPListItem command. Folder-based default values are an interim solution for new uploads.