sAMAccount Attribute Generator rule

You can use the code function instead of getAccountAttribute since sAMAccountName is set up as the account name for the AD source.

idn.accountExistsByDisplayName(application.getName(), username)