question

KarriJagadeeswaraReddy-7610 avatar image
0 Votes"
KarriJagadeeswaraReddy-7610 asked KarriJagadeeswaraReddy-7610 commented

Sharepoint APIs fro declaring a record using retentionLabels

For Sharepointonline (SPOnline CSOM 16.1 ver), we were able to get labels using CompliancePolicy.SPPolicyStoreProxy::GetAvailableTagsForSite api. These calls will not work for Onpremisis(SP2019).

Do we have any Apis for SP OP?  Using SP2019 CSOM version(16.0) has no related apis to get labels. Cant find any documentation for onpremisis around labels/retention. Everything is talking abt online.

Also, should the above complaince API even be used for Online? as this below post suggests it should not be used from API.
https://techcommunity.microsoft.com/t5/microsoft-sharepoint-blog/scripted-application-of-data-governance-labels/ba-p/242412 (under commnets section)

sharepoint-devoffice-sharepoint-server-development
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MichaelHan-MSFT avatar image
1 Vote"
MichaelHan-MSFT answered KarriJagadeeswaraReddy-7610 commented

Hi @KarriJagadeeswaraReddy-7610,

There is no such api for SharePoint onpremise. Applying SharePoint Retention Labels Programmatically is only availabel in SharePoint Online.

For SharePoint Online, I did a test on my end and it worked. I would suggest you test in test environment, then appy it in pro environment.


If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @KarriJagadeeswaraReddy-7610,

Is there anything update? If my answer helps you, please click "Accept Answer" and upvote it.

0 Votes 0 ·

Thanks Michael for the confirmation. sorry for delayed response.

0 Votes 0 ·