Skip to content

duoCreateUser and duoDeleteUser throw 40301 errors #62

@Bierpuffo

Description

@Bierpuffo

Imported the module
Executed the GetUsers without any issues. All data is shown.
When trying to create or delete users the error 40301 is shown.

Error message:
`40301 ; Access forbidden
At C:\Program Files\WindowsPowerShell\Modules\Duo\Duo.psm1:31 char:5

  • throw $formatError
    
  • ~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (:) [], FormatException
    • FullyQualifiedErrorId : 40301 ; Access forbidden`

According to the Duo API website:

  1. Does your framework override the Date header? The HTTP Date: header must be exactly the same string as was signed. This could result in a 40103 error.
  2. Are the Content-Length and Content-Type parameters correct? If not, your parameters may be ignored or you may receive a 40103 response because your signature considered parameters that the service didn't receive.

Why are the errors shown when using the functions duoCreateUser and duoDeleteUser and not with duoGetUser.
Checking the Module all actions use the functions _duoBuildCall and _duoMakeCall. Those functions execute some additional functions to create HMAC and canonicalize params.

I can't find any additional functions called for duoCreateUser or duoDeleteUser.

Thank you for helping.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions