Edit

PowerPoint.SensitivityLabelUpdateStatus enum

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Represents the outcome status of an attempt to update the sensitivity label on the presentation.

Remarks

API set: PowerPointApi BETA (PREVIEW ONLY)

Used by

Examples

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/preview-apis/manage-sensitivity-labels.yaml

await PowerPoint.run(async (context) => {
  // Apply the selected sensitivity label to the presentation.
  const labelId = (document.getElementById("label-id") as HTMLSelectElement).value;
  if (!labelId) {
    console.warn("Get the available labels, and then select a label to apply.");
    return;
  }

  const presentation: PowerPoint.Presentation = context.presentation;
  const presentationLabel: PowerPoint.SensitivityLabel = presentation.sensitivityLabel;

  const updateResult: OfficeExtension.ClientResult<PowerPoint.SensitivityLabelUpdateResult> =
    presentationLabel.tryToUpdate(labelId);
  await context.sync();

  if (updateResult.value.status === PowerPoint.SensitivityLabelUpdateStatus.success) {
    console.log("Applied the sensitivity label to the presentation.");
  } else {
    console.error(`The sensitivity label wasn't applied. Status: ${updateResult.value.status}`);
  }
});

Fields

abacAttributesNotAllowed = "AbacAttributesNotAllowed"

ABAC attribute values were supplied, but the target label is not ABAC-enabled.

abacAttributesRequired = "AbacAttributesRequired"

The target label is ABAC-enabled and requires attribute selections, but no ABAC attribute values were supplied.

crossTenant = "CrossTenant"

The label update failed because the document doesn't belong to the same tenant as the user.

documentReadOnly = "DocumentReadOnly"

The presentation is read-only and can't be modified.

insufficientPermission = "InsufficientPermission"

The user does not have sufficient permissions to update the label.

labelDisabled = "LabelDisabled"

The label update failed because the specified label is disabled or not applicable to the user.

labelingDisabled = "LabelingDisabled"

The label update failed because native labeling is not enabled for the user or installed SKU.

labelNotFound = "LabelNotFound"

The specified sensitivity label could not be found.

parentLabelNotSupported = "ParentLabelNotSupported"

The label update failed because the specified label is a parent label, which cannot be applied.

removingLabelNotSupported = "RemovingLabelNotSupported"

The label update failed because removing the sensitivity label is not supported.

success = "Success"

The sensitivity label was successfully updated.

unspecifiedFailure = "UnspecifiedFailure"

The update failed due to an unspecified error.

unsupportedAbac = "UnsupportedAbac"

The label update failed due to unsupported attribute-based access control (ABAC).

unsupportedDoubleKeyEncryption = "UnsupportedDoubleKeyEncryption"

The label update failed due to unsupported Double Key Encryption (DKE).

unsupportedUdp = "UnsupportedUdp"

The label update failed due to unsupported User-defined Permissions (UDP).

userNotFound = "UserNotFound"

The label update failed because the user's identity couldn't be found during label application.