Is the account the only one on the Mac? Or at least the only 501+ ID account? Under 10.14 with regard to the SecureToken status, if that account is the only one with a SecureToken granted, then that might be why it's unable to delete it. The OS may be preventing it to avoid putting the Mac into an odd situation where no local account has a SecureToken.
If that doesn't sound like the issue, then it might be that the deleteAccount verb is using some command(s) under the hood that have to be updated. Normally, excepting the above situation that I mentioned, you can delete an account with sysadminctl
Like so:
sudo sysadminctl -deleteUser <username>
You can give that a try, but if that doesn't work, it may be related the first situation I mentioned.
Okay. That worked AFTER I logged into the other user and passed on the security token. So, thank you for solving half of my equation. Is there a script that will pass the secure token to a mobile account on a mass basis?
sysadminctl is the only tool that can pass a securetoken. but you'll have to include a password in the script flags for both accounts.