Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

SAP EnableAccountJSON randomPassword not working?

TimoR
Regular Contributor
Regular Contributor

Hi,

I am trying to reset the password of a SAP account in the EnableAccountJSON:

{
"LOGONDATA": {
"GLTGV": "${new java.text.SimpleDateFormat('yyyyMMdd').format(new Date())}",
"GLTGB": "${usersObj?.enddate==null?'99991231': new java.text.SimpleDateFormat('yyyyMMdd').format(usersObj?.enddate)}"
},
"PASSWORD": {
"BAPIPWD": "${randomPassword}"
}
}

The documentation for SAP also clearly states that randomPassword for enabling an account is available:

https://docs.saviyntcloud.com/bundle/SAP-v24x/page/Content/Configuring-the-Integration-for-Provision... 

However, when I try to use it, the variables in the generated email look like this:

resourceOwners =
tasktype = Enable Account
manager = 1000330
accountOwners = []
randompassword = null
entitlement = []
provisioningOwners =
users = K_123588
requestor = xxx
out = java.io.PrintWriter@3b132686
account_password = null
task = com.saviynt.ecm.task.ArsTasks : 118189
accountname = K_123588 Updated Password - null
requestid = 2701156
endpointDisplayName = S4-E11
account_name = K_123588
endpointOwners = xxx
baseUrlForEmail = https://release-n-plus-one.saviyntcloud.com/ECM
user = K_123588
taskaction = Enable Account
account = K_123588

All variables containing the password are NULL.
For CreateAccountJSON, it works fine, however not for EnableAccountJSON.

Any reason this could be?

7 REPLIES 7

rushikeshvartak
All-Star
All-Star
  • Did you defined password policy in connection/ attached password policy to security system?
  • Do you see any error in logs ?

Regards,
Rushikesh Vartak
If you find this response useful, kindly consider selecting 'Accept As Solution' and clicking on the 'Kudos' button.

Hi,

there is a password policy defined and selected in the security system, yes.

The logs show no error, I could even find where it uses the correct password policy:

2024-06-12T15:07:40+02:00-ecm-worker-services.SaviyntCommonUtilityService-quartzScheduler_Worker-10-727zm-DEBUG-password policyRule: SAP RISE
2024-06-12T15:07:40+02:00-ecm-worker-services.SaviyntCommonUtilityService-quartzScheduler_Worker-10-727zm-DEBUG-Generating password from policy defined in connection params
 
But at least the variables in the generated email stay null.
 
Regards,
Timo Rothweiler

use ${task.password}


Regards,
Rushikesh Vartak
If you find this response useful, kindly consider selecting 'Accept As Solution' and clicking on the 'Kudos' button.

If you mean to use it in EnableAccountJSON instead of ${randomPassword}, i just tried that, and it didn't work either. The password was "null" again:

resourceOwners =
tasktype = Enable Account
manager = 1000330
accountOwners = []
randompassword = null
entitlement = []
provisioningOwners =
users = K_123580
requestor = xxx
out = java.io.PrintWriter@31a6cb65
account_password = null
task = com.saviynt.ecm.task.ArsTasks : 118196
accountname = K_123580 Updated Password - null
requestid = 2730128
endpointDisplayName = S4-E11-ReadOnly
account_name = K_123580
endpointOwners = xxx
baseUrlForEmail = https://release-n-plus-one.saviyntcloud.com/ECM
user = K_123580
taskaction = Enable Account
account = K_123580

Hi Sechs iam-test,
your SAP E11 account has been enabled for you. Below is the information related to your account including the account name and its new password.

Do you have any other suggestions what could be wrong why the password is NULL?

${task?.password}

${password}

 


Regards,
Rushikesh Vartak
If you find this response useful, kindly consider selecting 'Accept As Solution' and clicking on the 'Kudos' button.

I put those different variables in my email template.

The email I receive upon enabling the account is this:

 
Hi ${user.firstname} ${user.lastname},
your SAP E11 account has been enabled for you. Below is the information related to your account including the account name and its new password.
 
Account Name: ${account_name}
Password: ${task.password}
Password2: ${task?.password}
Password3: 
${password}
 
Now the variables don't even get replaced anymore.