We are experiencing difficulties retrieving the Expiration Status from the Compliance Details of a document in SharePoint. Our goal is to extract this Expiration Status so that we can use it in an API call or a KQL Query within Purview to either identify documents with a retention label or exclude documents that already have an Expiration Status based on a specific event.
To access the Compliance Details manually:
Right-click on the document.
Go to More > Compliance Details.
A pop-up window appears, displaying the Expiration Status of the document.
Does anyone know how to retrieve this Expiration Status programmatically, either via an API call or by exposing it in a column that can be queried through an API?
Alternatively, if there is another approach to achieving this, we would appreciate any insights or recommendations.
Thanks in advance! Pop up Complaince Details
What we tried: Different Api Calls to get the details of a document/retentionlabel or column insides, Look inside the Craweled properties and managed properties of sharepoint, ChatGBT, Microsoft Support, Microsoft Q/A.