ADO.NET Provider for Microsoft SharePoint

Build 26.0.9770

GetFileSensitivityLabel

Retrieves the sensitivity label applied to a file in SharePoint, including both the label name and label ID. Useful for compliance auditing and data classification verification.

Stored Procedure-Specific Information

To execute this procedure, enter:
EXEC GetFileSensitivityLabel UniqueId='F3B5EA22-911E-419A-B00C-79B38017E1EC'

Input

Name Type Required Description
UniqueId String False The unique identifier (GUID) of the file in SharePoint.
RelativePath String False The server-relative path of the file. For example: '/sites/MySite/Shared Documents/My Folder/My Document.txt'. Required if Id is not provided.

Result Set Columns

Name Type Description
Success Boolean Indicates whether the sensitivity label retrieval was successful. Returns 'true' for success and 'false' for failure.
LabelId String The unique identifier (GUID) of the sensitivity label applied to the file. Returns null if no label is applied.
LabelName String The display name of the sensitivity label applied to the file. Returns null if no label is applied.
ErrorCode Integer The error code returned if the operation fails. Returns null on success.
ErrorMessage String Details of any error encountered during the operation. Returns null on success.

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 26.0.9770