Enhanced Security Measures in Place:   To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.

automation script to take password

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

automation script to take password

L1 Bithead

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?

2 REPLIES 2

L3 Networker

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.

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

  • 1752 Views
  • 2 replies
  • 1 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

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!