How would I get it to create a UPN without space and special character?
example:
First Name: John
Last Name: O’Neal Montanerioalcatrez
We want it to create the username like the following, First Letter of FirstName only and 19 letters of the last name with no special character, and space.
so it be like this for the UPN: JONealMontanerioalcat
*NOTE: If the 19 letter of last name is not viable then how would we remove space and special character from last name atleast.
This expression concats the names and then calls the RemoveWhiteSpaceSpecialCharactersDiacritics method to remove white space and special chars.
It also uses a c# ternary expression to check the final length, if its less than 19 chars, then it returns the full string, if its more than 19 chars, it will only return the first 19 chars.