IFileHandler.SetLabel(Label, LabelingOptions, ProtectionSettings) Method

Definition

Sets the sensitivity label to the file.

public void SetLabel (Microsoft.InformationProtection.Label label, Microsoft.InformationProtection.File.LabelingOptions labelingOptions, Microsoft.InformationProtection.File.ProtectionSettings protectionSettings);
abstract member SetLabel : Microsoft.InformationProtection.Label * Microsoft.InformationProtection.File.LabelingOptions * Microsoft.InformationProtection.File.ProtectionSettings -> unit
Public Sub SetLabel (label As Label, labelingOptions As LabelingOptions, protectionSettings As ProtectionSettings)

Parameters

label
Label
labelingOptions
LabelingOptions
protectionSettings
ProtectionSettings

Remarks

Changes will not be written to the file until CommitAsync will be called.

Will throw a JustificationRequiredError when setting the label requires the operation to be justified (via the labelingOptions parameter).

Applies to