0 votes

We have run into an issue where the special characters in a person's name are causing havoc with email addresses. We need to remove all special characters and only leave letters when creating the email address. Right now we are creating email with the Firstname Lastname parameters. We assume we want to use the FullName and remove the characters before creation. Please advise.

by (3.2k points)

1 Answer

0 votes
by (272k points)
selected by
Best answer

Hello,

Have a look at the following tutorial: http://www.adaxes.com/tutorials_Simplif ... Script.htm. On step 5 check Example 6: Replace characters in the username.

0

0

Hello,

Check our post one more time. The Business Rule must trigger Before Updating or Creating a User, not After.

0

ok, i was thinking i needed to have the email alias created first before it could remove characters. I deleted the previous business rule and created it for before creating a user.

0

Hello,

As we can see there is a Business Rule that creates a mailbox for the user after the script is executed. You need to create another Business Rule that will trigger Before Creating an Exchange mailbox for a User and execute the script below.

$map = @{ "å"="a"; "ö"="o"; "ä"="a";"ü"="u"; "ñ"="n"; "é"="e"; "-"=""; "'"="" }
$alias = $Context.Action.MailAlias
foreach ($key in $map.Keys)
{
    $alias = $alias.Replace($key, $map[$key])
}
$Context.Action.MailAlias = $alias

The rule should look as follows:

0

Thank you the missing piece was the Before Creating an Exchange Mailbox. Worked flawlessly.

Related questions

0 votes
0 answers

Hi, I found the following example to remove special characters from an attribute but somehow I can't get it to work. I'm using this script in a business rule before ... "Information") } } Can someone identify what i'm doing wrong? Incorrect if statement?

asked Mar 4, 2019 by Quinten (100 points)
0 votes
1 answer

I want to remove special characters on the onboarding web form for username and mail before clicking Finish. Using a script like on the rule "Before User Creation" seems to to do the change to late and you can not verify the email adress before created.

asked Dec 27, 2021 by joem (20 points)
0 votes
1 answer

Hello, A new question : when I create a new contact in Adaxes, I'd like the email address automatically created. How can I do this ? Thanks for your response. Yoann

asked Oct 15, 2012 by yoann.hamon (180 points)
0 votes
1 answer

I am trying to create a business rule to send an email to the manager of the group when a member is added or removed from a rule-based group. I have created the business rule and it works for other groups but not for a rule-based group. Can this be done?

asked Jul 19, 2021 by mark.it.admin (2.3k points)
0 votes
1 answer

Hello, I'm wondering if it's possible to export a list of all users in AD along with their email addresses to an Excel spreadsheet and then schedule that export to append ... address that wasn't previously used. Please let me know if this is possible. Thanks!

asked Apr 11 by sjjb2024 (60 points)
3,351 questions
3,052 answers
7,791 comments
545,079 users