A username policy can be used to create customized usernames using attributes and other options on a per-role basis. This policy should be used if usernames are not being generated or provided in a district's source data. Once the policy is enabled, attribute rules are added to function as building blocks for the username.
Configure staff user names to use the first initial, then use the complete last name, all in lowercase.
Configure student usernames to use the last 5 characters of their student ID, followed by a static value for the school's abbreviation.
You should remove any special characters or extra spaces from both the first and last name before creating a username. The expression builder can be used in the mappings of the source adapter to perform this action prior to the username policy. Utilizing a dedicated attribute to place modified name values can help to keep any provided names intact.
Additionally, without a rename policy in place, username policies will only apply upon creation of an account. This would also apply to attribute configuration with username component policies.