The following lines show an example of JavaScript code to assign specific tags to users:
let user_email=attributes.emailAddress;
if (user_email.endsWith("example.com")) {
user.tags=["tag1", "tag2"];
}
attributescorresponds to the user values coming from the authentication realm.- Defining a user's roles, groups, and tags with the profile mapper only affects the user's roles, groups, and tags defined with the profile mapper. It is not possible to use the profile mapper to:
- Change a user's default role.
- Change a user's roles, groups, or tags attributed manually.
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.