Account Discovery Fails immediately with error message "ListMachinesTaskHandler | Execute | Invalid account id. TaskId: XXX, SafeId: XXX, FileNumber: X" on Discovery Error Log

Account Discovery Fails immediately with error message "ListMachinesTaskHandler | Execute | Invalid account id. TaskId: XXX, SafeId: XXX, FileNumber: X" on Discovery Error Log

141
Created On 11/10/26 10:57 AM - Last Modified 11/10/26 16:04 PM


Symptom


Account Discovery fails immediately with the following errors on discovery error log:

XX/06/2023 16:25:35.441 | Discovery started. Discovery Name: Windows discovery from XXXXXXXXXX@test.com
XX/06/2023 16:25:35.457 | ListMachinesTaskHandler | Execute | Invalid account id. TaskId: XXX, SafeId: XXX, FileNumber: X
XX/06/2023 16:25:35.457 | ListMachinesTaskHandler | Execute | Couldn't load accounts (default\connection). TaskID: XXX
XX/06/2023 16:25:35.457 | Discovery ended. Discovery Name: Windows discovery from XXXXXXXXXX@test.com

And CACPMScanner.log with debug level set to "3":
image.png
******Note******
To increase debug level of CACPMScanner.log, 
   1. Open “C:\Program Files (x86)\CyberArk\Password Manager\Scanner\CACPMScanner.exe.config”
   2. Change <add key="LogLevel" value="2"/> to <add key="LogLevel" value="3"/>
   3. Restart the Cyberark Central Policy Manager Scanner service
   4. Reproduce the issue, or wait for it to re-occur to review updated CACPMScanner.log with updated debug level 


Environment


Privileged Access Manager (PAM, self-hosted);Privilege Cloud Central Policy Manager (CPM);Discovery;Discovery and Accounts Feed 1. PVWA Account Discovery
2. CPM


Cause


1. PasswordManagerUser and ScannerUser not having full permissions (Read and Execute, Full Control, List, Read, Modify, Write) on the following folder(s):

  • [Drive]:\Program Files (x86)\Cyberark\PasswordManager\Vault
  • [Drive]:\Program Files (x86)\Cyberark\PasswordManager\Logs
  • [Drive]:\Program Files (x86)\Cyberark\PasswordManager\tmp
  • [Drive]:\Program Files (x86)\Cyberark\PasswordManager\bin
  • [Drive]:\Program Files (x86)\Cyberark\PasswordManager\Scanner\Log
2. CPM Vault User not having full permissions on the safe in which the account used in performing the discovery scan is stored


Resolution


1. Grant full permissions (Read and Execute, Full Control, List, Read, Modify, Write) to PasswordManagerUser and ScannerUser on the following folders: 
  • [Drive]:\Program Files (x86)\Cyberark\PasswordManager\Vault
  • [Drive]:\Program Files (x86)\Cyberark\PasswordManager\Logs
  • [Drive]:\Program Files (x86)\Cyberark\PasswordManager\tmp
  • [Drive]:\Program Files (x86)\Cyberark\PasswordManager\bin
  • [Drive]:\Program Files (x86)\Cyberark\PasswordManager\Scanner\Log
2. Grant CPM Vault user full permissions on the safe that the account used in performing discovery scan is stored:
image.png
or from PVWA, assign the safe where the account used in performing the discovery scan is stored, to the CPM performing the discovery scan, by:
  • navigating to Polcies -> Safes -> ***Find the required safe***
  • Once required safe is found, click on (...) and click Edit
image.png
  • click "Assign to CPM" to select the appropriate CPM user for the CPM used in performing the discovery scan
image.png
  • Click save to save changes and this should resolve the issue


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000001IMJCA2&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail