The following example shows JavaScript code to assign the ANALYTICS_USER role to users belonging to the Accounting department. department is a custom property. The department value comes from the SSO.
const departement = user.customProperties.departement?.[0];
if (departement === 'Accounting') {
user.groups = []
user.groups.push("ANALYTICS_USER");
}
Type console. to see the full list of logging methods. Methods include console.log or console.assert. The logs are only visible to the administrator in the Profile mappers assistant drawer. Fluid Topics does not collect the logs.