Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

WINPS CREATEACCOUNTJSON password

Edith
New Contributor III
New Contributor III

Hello Team,

I created a WINPS connection to be able to execute powershell scripts from a remote machine.

Below is the CREATEACCOUNTJSON:

{
"CREATEACC": [
"Script=

$pw=convertto-securestring '${PSSCRIPT_PASSWORD}' -asplaintext -force;$mycred = new-object -typename System.Management.Automation.PSCredential -argumentlist 'user',$pw;Invoke-Command -ComputerName 'remotemachine.com' -Credential $mycred -ScriptBlock {C:/PSScript1/test.ps1 }"
],
"SuccessResponses": {
"OBJECTTOREAD": "get(0).PSShowComputerName",
"SUCCESSVALUE": "True"
},
"unsuccessResponses": {
"statusCode": [
400,
401,
404,
405,
500
]
}
}

Using the JSON like this, I always get java.lang.RuntimeException: Failed : HTTP error code : 500. If the password is in clear text in JSON, the powershell script is executed correctly, but the task still fails. with "Error creating account"

My questions are:

- how to pass the password in JSON and not be in clear text and the script to be executed successfully

- why the task is failing if the script is executed successfully on the remote machine?

Forum post read:

CreateAccountJSON in WINPS connector - Saviynt Forums - 23835 (did the format of JASON like this; still fails with HTTP 500)

WINPS -NEW Account Task is Failing - EnableMailBox - Saviynt Forums - 73189

How to trigger Script_To_Execute in WinPS connecti... - Saviynt Forums - 68227

Thank you!

7 REPLIES 7

rushikeshvartak
All-Star
All-Star

Could you kindly provide a detailed snapshot of the information extracted from the logs, encompassing errors and other pertinent functionality details encountered during the execution of this process? Your assistance in furnishing this information would greatly aid in the analysis and resolution of any issues .



‼️‼️⚠️Do not upload any attachments that contain sensitive information, such as IP Addresses, URLs, Company/Employee Names, Email Addresses, etc.⚠️‼️‼️


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Edith
New Contributor III
New Contributor III

Thank you @rushikeshvartak 

Attach you can find the log.

Regards,
Edith

  • Did you defined password in create account JSON ?
  • 2024-07-29T14:57:21.428+00:00,ecm-worker,services.WindowsConnectorService,quartzScheduler_Worker-3-lc5v2,ERROR,Error occured in webservice call,,,,,,,,,,
    2024-07-29T14:57:21.557+00:00,ecm-worker,,null-lc5v2,,"java.lang.RuntimeException: Failed : HTTP error code : 500 at com.saviynt.ecm.services.WindowsConnectorService.callRestWebService(WindowsConnectorService.groovy:162) at

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Edith
New Contributor III
New Contributor III

Hi,

How and where should this parameter be defined so it can be taken correctly in the credential string and not to be in clear text? Is not the same with ?

Edith_0-1722266368639.png

Thank you!

Refer https://forums.saviynt.com/t5/saviynt-knowledge-base/how-to-mask-password-in-rest-connector-json-by-...


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Edith
New Contributor III
New Contributor III

Yes, for REST connector I could do it and working properly. But I wanted to know how to mask the password in WINCONNECTOR - CREATEACCOUNTJSON.

Thank you

 

Refer https://forums.saviynt.com/t5/identity-governance/500-error-while-integrating-on-prem-exchange-with-...


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.