Skip to content

$fn.removeUsers(param)

Exclude registered users from application authorization groups."asynchronous"

Arguments

NameTypeDescription
paramobjectGroup name and user information to be excluded

param details

PropertyTypeDescription
groupNamestringGroup Name
emailsarray of stringArray of email addresses of users to exclude from the group

Return value

None

Sample

try {
/* CSV content
* ---------------------------
* "email"
* "user01@test.co.jp"
* "user02@test.co.jp"
* ---------------------------
*/
const file = await $fn.getFile('/removeUsers.csv');
const buffer = file.data;
const addUsers = $fn.csvToObject(buffer);
const emails = addUsers.map(function (item) {
return item['email'];
});
// Exclude users from authorization group [Group01]
await $fn.removeUsers({
groupName: "Group01",
emails: emails
});
} catch(err) {
console.log("Error", err);
}