Share via

How to identify Preservation Hold Library in SharePoint online using CSOM?

Yuvraj Patil 441 Reputation points
2025-07-04T15:50:40.2066667+00:00

Hello,

I am working on a application where I would like to identify Preservation Hold Library and take some action. I know user can also create a document library with similar name but I want to take action only when its a system list Preservation Hold Library created by SharePoint.

I have few points can I use them?
IsSystemList=True
EntityTypeName=PreservationHoldLibrary
ListItemEntityTypeFullName=SP.Data.PreservationHoldLibraryItem

Thanks,
Yuvraj.

Microsoft 365 and Office | SharePoint | Development
0 comments No comments

1 answer

Sort by: Most helpful
  1. 杨建宇 86 Reputation points MVP
    2026-03-15T10:36:43.6333333+00:00

    Hi, you can use below method:

    list.TemplateFeatureId == new Guid("f0b085c0-04b6-4b86-b8dc-0b5144d96464")

    list.BaseTemplate == 101

    list.Title == "Preservation Hold Library";

    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.