How to create a report to see the run as credential in scripts for kace?
We used to have a report that would allow us to search for the run as credential in kace scripts. However, the report and new reports that I create do not seem to allow the run as credential field anymore. Is there any fix for this or is that ability gone forever now?
I get the following error when running the reports:
mysqli error: [1054: Unknown column 'RUN_AS_CREDENTIAL' in 'order clause'] in EXECUTE("SELECT KBOT.NAME, (select NAME as RUN_AS_CREDENTIAL from CREDENTIAL where CREDENTIAL.ID=KBOT.RUN_AS_CREDENTIAL_ID), KBOT.ID as TOPIC_ID FROM KBOT left join (select @limitct := 0) T on FALSE WHERE (KBOT.TYPE in ('job','policy','hidden')) ORDER BY NAME, RUN_AS_CREDENTIAL")
Assuming your SQL is embedded in the error you seem to be selecting RUN_AS_CREDENTIAL from the CREDENTIAL table not the KBOT table?
You may want to try this to see if it gives you what you need
SELECT KBOT.NAME as SCRIPT_NAME,
CREDENTIAL.NAME as CREDENTIAL_USED
FROM KBOT KBOT
INNER JOIN CREDENTIAL CREDENTIAL
ON (KBOT.RUN_AS_CREDENTIAL_ID = CREDENTIAL.ID)
WHERE (CREDENTIAL.NAME != '0')