0 votes

Hello,

I have to provision user accounts for different users from different companies in one Active Directory.
Therefore I want to generate the samaccountname automatically when creatin users. I see I can use all AD attributes to combine them in various ways to generate that name, but I want to have the SAMACCOUNTNAME unique for the whole AD. I need something that is available and unique to generate the SAMACCOUNTNAME automatically. Any hints ??
It doesn´t matter how the SAMACCOUNTNAME looks like!

Thank you very much

Regards,
Thorsten

by (240 points)

1 Answer

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

Hello,

There are two ways to solve the problem:

  1. Create a Business Rule that will automatically modify the username if it is not unique. For details, please see Validate/Modify User Input Using a Script (step 5, example 2).

    or

  2. Modify the builtin Property Pattern called User Pattern to generate usernames using the following template: %adm-RandomString,20%

0

Hello,

perfect, that works for me!

Thank you
Regards,
Thorsten

Related questions

0 votes
1 answer

Hello we want to renaming a user with changing the userhome directory and the exchange properties. i adding the code we have: Import-Module Adaxes function DoesUserExist($username) { ... for Mail, is ever the old entry. How can we use the new sAMAccountName?

asked Jul 25 by KEME (80 points)
0 votes
1 answer

This script description says it can find the manager via FullName Distinguished name or Display name. Wondering if we can change it to use employeeID or SamAccountName.

asked Oct 24, 2022 by mightycabal (1.0k points)
0 votes
1 answer

Hello, With your tool, is there a way to Bulk modify Users by adding the SAMAccountName to the CN/Displayname i.E %LastName%, %FirstName%, %(SAMAccountName)% In ... (Fred Stokes), for both CN and DisplayName Stokes, Fred (SAMAccountName) Regards, Enrico

asked Nov 20, 2018 by EnricoM (50 points)
0 votes
1 answer

I would like to add a prefix to all user sAMAccountName For example, if the user's logon name is jsmith and their current sAMAccountName is jsmith, I want to change the sAMAccountName to abc_jsmith. How can I do this for all users in bulk? Thanks.

asked Jul 3, 2014 by jstinson83 (130 points)
0 votes
1 answer

Hello, Is it possible with a script to generate a username with a sequential number affixed? Such as first initial, last initial and a sequential 5 digiit number starting ... number script but I am unsure how Adaxes stores the last number used. Thanks!

asked Sep 30 by curtisa (290 points)
3,548 questions
3,239 answers
8,232 comments
547,814 users