- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Enhanced Security Measures in Place: To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.
06-07-2023 08:36 AM
I'm attempting to write an automation that takes a user password.
Then sends an api call containing that password, but when I enable the mandatory sensitive options on the automation script. The API call I wrote no longer runs. Are there any examples of passing a password from the mandatory sensitive box to an automation script?
06-21-2023 09:29 AM
Hello Sig_9,
Since you are making a call outside the system, we recommend creating an integration since they are made for this purpose. Automations are more for internal calls and other scripts that don't need to go outside XSOAR. You should be able to repurpose the code you have created and have the password field work properly with an integration.
06-22-2023 07:13 AM
I did eventually figure it out thank you. Normally, ideally this is what I understand needs to be done, but I'm new to xsoar and didn't have plans to expand the api calls beyond this one use case. For this use case
set the argument in this call we'll call it 'foo', in the script settings selecting sensitive.
using argument name you chose in the arguments settings
params = demisto.args()
bar = str(params.get('foo', {}))
The key is your argument name inside of settings is what you get with params.get(). This may seem obvious, but it's not initially readily apparent. Especially on a first read of the code conventions docs. https://xsoar.pan.dev/docs/integrations/code-conventions#credentials
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!