- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
04-08-2019 10:46 AM
I'm testing AIM authentication, but it fails with the following error if I try restricting to HASH or PATH. If I remove those and just use ALLOWED MACHINES, my script works just fine.
[08/04/2019 | 13:24:35] | :: | APPAP087E Application authentication failure for Application APPID (CASCU095E Failed to find out application script file path. (Error: Process has no arguments. (command: "), Error code: -1).)
[08/04/2019 | 13:24:35] | :: | APPAP002E Provider "ProviderName" has failed to fetch password with query [Safe="safename";Object="ObjectName"] for application [APPID]. Fetch reason: []. Failure reason: [APPAP087E Application authentication failure]
This is my setup:
Installed AIM on Server 2012.
Created Application.
Granted safe permission for application and provider.
Hash = Created using the following command - C:\Program Files (x86)\CyberArk\ApplicationPasswordProvider\Utils> .\AIMGetAppInfo.exe gethash /Filepath c:\tmp\myfile.ps1
PATH = c:\tmp\myfile.ps1
Inside my script, I am using the following command to retrieve the password. If I run this code manually or run my script without HASH or PATH configured, it works just fine. Otherwise it fgails with the errors above.
C:\Program Files (x86)\CyberArk\ApplicationPasswordSdk>CLIPasswordSDK.exe getpassword /p AppDescs.AppID=$AppID /p query="Safe=$strSafeName;Object=$strObjectName" /o Password
04-08-2019 11:16 AM
Have you tried below solution? Looks like you didn't create hash in a correct way for powershell script
https://community.cyberark.com/s/article/00004787
04-08-2019 11:27 AM
Hi Ankush,
I am using the same format I found in a related post found below at the bottom. When I tried using the article you referenced, I get an error stating "CLP010s: Parameter "powershell.exe" is redundant".
can you try AIMGetAppInfo.exe gethash /FilePath "C:\AIMTest\psscript.ps1"
https://community.cyberark.com/s/feed/0D52J00006aGVSDSA4
04-08-2019 11:34 AM
Can you try adding powershell.exe also to path may be?
04-08-2019 01:21 PM
Weirdly enough, the “only” way I can launch the powershell script and have it authorize the HASH is by “cmd /c powershell.exe C:\tmp\myfile.ps1”. If I try to launch it by dot sourcing like I have been, it fails with the error message above. Using the cmd launch process give accurate errors to as in hash not authorized or file path not correct.
08-21-2023 03:41 AM
4 years later I had the same issue, so here is my solution based on the last reply by rvipp.
It seems that the AppProvider will look for a "/" to parse the script name in the command and will fail to find it if given with "-"
This works: "powershell.exe /file myscript.ps1"
This doesn't: "powershell.exe -file myscript.ps1"
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!

