コンテンツにスキップ

$fn.getGroups(option)

ユーザマネージャに存在するすべてのグループを取得します。[非同期]

引数

名前説明
optionobjectグループに所属するユーザを含めるか指定

option詳細

名前説明
containUsersbooleantrue: グループに所属するユーザを含める
false: グループに所属するユーザを含めない
デフォルトはtrue

戻り値

説明
Promise<Group[]>グループリスト
オブジェクトプロパティ説明
GroupgroupNamestringグループ名
descriptionstring説明
membersobject arrayグループに所属するアクティブユーザ配列

サンプル

try {
// グループに所属するユーザを含めないグループ情報を取得
const groups = await $fn.getGroups({containUsers:false});
console.log(groups);
} catch (err) {
console.log("Error", err);
}