Share via


Office.SensitivityLabelDetails interface

Outlook で使用できる秘密度ラベルのプロパティを表します。

注釈

[ API セット: メールボックス 1.13 ]

最小アクセス許可レベル: 項目の読み取り/書き込み

適用できる Outlook モード: 新規作成

重要: アドインで秘密度ラベル機能を使用するには、Microsoft 365 E5 サブスクリプションが必要です。

アドインで秘密度ラベルを管理する方法の詳細については、「作成モードでメッセージまたは予定の秘密度ラベルを管理する」を参照してください。

// Check whether the catalog of sensitivity labels is enabled on the current mailbox.
Office.context.sensitivityLabelsCatalog.getIsEnabledAsync((asyncResult) => {
    // If the catalog is enabled, get all available sensitivity labels.
    if (asyncResult.status === Office.AsyncResultStatus.Succeeded && asyncResult.value == true) {
        Office.context.sensitivityLabelsCatalog.getAsync((asyncResult) => {
            if (asyncResult.status === Office.AsyncResultStatus.Succeeded) {
                const catalog = asyncResult.value;
                console.log("Sensitivity Labels Catalog:");
                
                // Log the details of the available sensitivity labels to the console.
                catalog.forEach((sensitivityLabel) => {
                    console.log(`Name: ${sensitivityLabel.name}`);
                    console.log(`ID: ${sensitivityLabel.id}`);
                    console.log(`Tooltip: ${sensitivityLabel.tooltip}`);
                    console.log(`Color: ${sensitivityLabel.color}`);
                    console.log(`Sublabels: ${JSON.stringify(sensitivityLabel.children)}`);
                });
            } else {
                console.log("Action failed with error: " + asyncResult.error.message);
            }
        });
    } else {
        console.log("Action failed with error: " + asyncResult.error.message);
    }
});

プロパティ

children

秘密 度ラベルのサブ ラベル。 nullラベルにサブラベルがない場合は を返します。

color

秘密度ラベルの色。

id

秘密度ラベルの一意識別子 (GUID)。

name

秘密度ラベルの名前。

tooltip

秘密度ラベルの説明。

プロパティの詳細

children

秘密 度ラベルのサブ ラベル。 nullラベルにサブラベルがない場合は を返します。

children: SensitivityLabelDetails[];

プロパティ値

color

秘密度ラベルの色。

color: string;

プロパティ値

string

id

秘密度ラベルの一意識別子 (GUID)。

id: string;

プロパティ値

string

name

秘密度ラベルの名前。

name: string;

プロパティ値

string

tooltip

秘密度ラベルの説明。

tooltip: string;

プロパティ値

string