Can't resend activation link (enroll) for expired user using API

We have a fully automated solution that creates DUO accounts and sends the enrollment email.
I am trying to build a tool to resend an enrollment email for users that have expired.
The same command (duoEnrollUser) doesn’t seem to work.
I am getting this error message. Is there something that should be done before running this command?
User has an email:
40003 ; Duplicate resource
At C:\Program Files\WindowsPowerShell\Modules\Duo\Duo.psm1:31 char:5

  • throw $formatError
  • ~~~~~~~~~~~~~~~~~~
    • CategoryInfo : OperationStopped: (:slight_smile: , FormatException
    • FullyQualifiedErrorId : 40003 ; Duplicate resource

What is the actual API POST your tool is making there?