PowerPoint.LabelingCapability 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.
Indicates the labeling capability.
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) => {
// Check whether sensitivity labeling is available for the current user.
const labelCatalog: PowerPoint.SensitivityLabelsCatalog = context.sensitivityLabelsCatalog;
if (!labelCatalog) {
console.warn("The sensitivity label catalog isn't available.");
return;
}
labelCatalog.load("getLabelingCapability");
await context.sync();
switch (labelCatalog.getLabelingCapability) {
case PowerPoint.LabelingCapability.labelingEnabled:
console.log("Sensitivity labeling is enabled.");
break;
case PowerPoint.LabelingCapability.labelingDisabled:
console.log("Sensitivity labeling is disabled.");
break;
case PowerPoint.LabelingCapability.labelingPolicyNotFound:
console.log("No sensitivity labeling policy was found.");
break;
case PowerPoint.LabelingCapability.noLicense:
console.log("The current user doesn't have a valid sensitivity labeling license.");
break;
default:
console.log(`Unknown labeling capability: ${labelCatalog.getLabelingCapability}`);
break;
}
});
Fields
| attributeBasedAccessControlEnabled = "AttributeBasedAccessControlEnabled" | Represents attribute-based access control (ABAC) being supported by the host. When returned with |
| labelingDisabled = "LabelingDisabled" | Represents labeling being disabled. |
| labelingEnabled = "LabelingEnabled" | Represents labeling being enabled. |
| labelingPolicyNotFound = "LabelingPolicyNotFound" | Represents labeling policy not found. |
| noLicense = "NoLicense" | Represents there's no valid licenses. |