input variable password is not password2 type

Harikrishna3
Tera Contributor

Hi Every one,

Im working automation for password rest in AD.

for this im using active directory reset AD user paassword activity from orchestration.

i have created the work flow, created password input variable of type password 2 . 

 

But while testing im getting error saying :

input variable password is not password2 type

 

 

Any inputs on this ?

 

How to fix it?

 

 

Harikrishna3_0-1667205584225.png

 

 

Harikrishna3_1-1667205663175.pngHarikrishna3_2-1667205734555.png

 

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@Harikrishna3 

before sending that value to workflow activity did you decrypt it?

decrypt and then assign the value to that workflow input

workflow input type will be as String

If you are using catalog variable then

var password = current.variables.A.getDecryptedValue();

if it's normal form with password2 field type then

var password = current.<password2_field_name>.getDecryptedValue();

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Harikrishna3
Tera Contributor

Hi @Ankur Bawiskar 

 

im trying to use

getDecryptedValue()

but getting below error.

Access to api 'getDecryptedValue(what_is_the_password)' from scope 'sn_ad' has been refused due to the api's cross-scope access policy

@Harikrishna3 

that method is not supported in scoped app

Alternative

1) create script include in global scope and accessible from all scope

2) pass the current record sysId and use that decrypt method in script include function and return that value

3) call this global scope script include from your workflow run script

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar 

I haved tried this steps, but getting cross scope error.

 

also the password is getting policy error, same password is able to reset from activity designer.

 

Harikrishna3_0-1669114633563.png

 

Harikrishna3_1-1669114691810.pngHarikrishna3_2-1669114733693.png



here the both catalog variables string type variable.
do we have to use decryption for string type variable ?