and more in a single search tool across platforms. Read the announcement here. |
01/04/2024 09:47 AM - edited 01/04/2024 01:21 PM
Hi, I am using the createAccountJson in the Winconnector to launch a powershell script. To be clear it is not creating an account, right now its just doing a get-aduser. Here is the create account config:
{
"CREATEACC" : [
"Script=Get-Aduser ttini"
],
"SuccessResponses": [
"Objectreturned"
]
}
The only error I see in the logs after triggering the prov job is this:
"2024-01-04T17:15:15.164+00:00","ecm","errors.GrailsExceptionResolver","http-nio-8080-exec-4-kb7s6","ERROR","NullPointerException occurred when processing request: [GET] /ECM/jobcontrol/triggerchainjobpopup"
"2024-01-04T17:15:15.239+00:00","ecm","","null-kb7s6","","Cannot invoke method trim() on null object. Stacktrace follows:"
"2024-01-04T17:15:15.239+00:00","ecm","","null-kb7s6","","java.lang.NullPointerException: Cannot invoke method trim() on null object at com.saviynt.ecm.utility.domain.JobcontrolController$_closure29.doCall(JobcontrolController.groovy:1121) at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.java:53) at com.saviynt.webservice.SaviyntRestAuthenticationFilter.doFilter(SaviyntRestAuthenticationFilter.groovy:155) at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:62) at grails.plugin.springsecurity.web.SecurityRequestHolderFilter.doFilter(SecurityRequestHolderFilter.java:59) at com.mrhaki.grails.plugin.xframeoptions.web.XFrameOptionsFilter.doFilterInternal(XFrameOptionsFilter.java:69) at com.brandseye.cors.CorsFilter.doFilter(CorsFilter.java:82) at java.lang.Thread.run(Thread.java:750)"
"2024-01-04T17:15:15.223+00:00","ecm","error.ErrorController","http-nio-8080-exec-4-kb7s6","ERROR","Exception"
"2024-01-04T17:15:15.239+00:00","ecm","","null-kb7s6","","org.codehaus.groovy.grails.web.errors.GrailsWrappedRuntimeException: Cannot invoke method trim() on null object at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.java:53) at com.saviynt.webservice.SaviyntRestAuthenticationFilter.doFilter(SaviyntRestAuthenticationFilter.groovy:155) at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:62) at grails.plugin.springsecurity.web.SecurityRequestHolderFilter.doFilter(SecurityRequestHolderFilter.java:59) at com.mrhaki.grails.plugin.xframeoptions.web.XFrameOptionsFilter.doFilterInternal(XFrameOptionsFilter.java:69) at com.brandseye.cors.CorsFilter.doFilter(CorsFilter.java:82) at java.lang.Thread.run(Thread.java:750)Caused by: java.lang.NullPointerException: Cannot invoke method trim() on null object at com.saviynt.ecm.utility.domain.JobcontrolController$_closure29.doCall(JobcontrolController.groovy:1121) ... 7 more"
The prov job completes successfully and there are no errors on the task object under pending tasks. Am I missing something in my config call? Test connection works fine.
Here is what the pending task object looks like:
I have tried a couple more configs. Also I don't think the error I shared is relevant to the issue. I am actually not seeing any errors at all when running the provisioning job. Job completes successfully, tasks remain with no comments or errors as you would typically see on a failed provisioning.
Here are some configs i have tried:
{
"CREATEACC":[
"script=\$pw = convertto-securestring '${PSSCRIPT_PASSWORD}' -asplaintext -force;\$mycred = new-object -typename System.Management.Automation.PSCredential -argumentlist 'svcaccount',\$pw;Invoke-Command -ComputerName 'localhost' -Credential \$mycred -ScriptBlock {Get-Aduser ttni}"
],
"SuccessResponses":{
"Objectreturned"
}
}
{
"CREATEACC":[
"script=try {
try {
$cred = New-Object System.Management.Automation.PSCredential -argumentlist 'svcaccount', (ConvertTo-SecureString ${PSSCRIPT_PASSWORD} -AsPlainText -Force);
if(!(get-aduser ttni)){
$errorMessage = "Account not found"
write-output $errorMessage
throw $errorMessage
}
}
catch {
write-error $_
}
$customObject = 1 | Select-Object -Property MyCustomProperty
$customObject.MyCustomProperty = "Account found"
$customObject"
],
"SuccessResponses":{
"Objectreturned"
}
}
Any guidance would be greatly appreciated.
01/07/2024 10:03 PM - edited 01/07/2024 10:11 PM
Please refer to the WIN PS connector guide and review all the configurations.
Understanding the Integration between EIC and Windows Server (saviyntcloud.com)
Also you can refer below forum post for syntax.
https://forums.saviynt.com/t5/identity-governance/syntax-error-winps-connector/m-p/61359#M37838
If you face any issues further, please share the complete JSONs/powershell script.
Regards,
Dhruv Sharma
01/16/2024 09:07 PM
01/17/2024 04:19 AM
I gave up on using the winconnector, your expert services said to use the rest connection which is giving its own set of issues and has no documentation around.
02/01/2024 06:11 AM
Could you please share what are the issues you are facing currently with REST connection.
Regards,
Dhruv Sharma