IBM Verify

IBM Verify

Join this online user group to communicate across Security product users and IBM experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  PAM_RestAPI

    Posted Tue November 12, 2024 08:55 AM

    Hi everyone!

    I am using a REST API to create and update secrets in PAM, but I'm encountering an error when trying to use the "POST" method. The error message is shown above.

    Does anyone know what the problem could be? I cannot find anywhere to change the API settings in PAM. We are using ISVA in this environment.

    I run the script directly on the PAM server, so the connection doesn't go through ISVA.



    -----Create secret -----
    ----- Exception -----
    System.Net.WebException: The remote server returned an error: (400) Bad Request.
       at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)
       at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()
    BadRequest
    Bad Request
    {
      "errorCode": "API_AccessDeniedOnFolder",
      "message": "Access Denied on Folder"

    Here you can se the full script to create secrets. 
    REST API PowerShell Scripts



    ------------------------------
    Jakob Diab
    ------------------------------


  • 2.  RE: PAM_RestAPI

    Posted Sat November 23, 2024 06:12 PM

    Hello Jakob Diab,

    Could you please check the permissions of the user you are using on the folder's Permissions tab?

     Ensure that the user has at least "Edit" rights to make the necessary changes.



    ------------------------------
    mohamed ghonim
    ------------------------------



  • 3.  RE: PAM_RestAPI

    Posted Mon November 25, 2024 02:47 AM

    Thanks! It was the wrong folder ID that my script account didn't have permission to access.



    ------------------------------
    Jakob Diab
    ------------------------------