12/20/2022 01:48 AM
Hi,
in SAP we have an UPDATEACCOUNTJSON like this:
{
"ADDRESS": {
"LASTNAME": "${user.lastname}",
"FIRSTNAME": "${user.firstname}",
"BUILDING_P": "${user.customproperty10}",
"TEL1_NUMBR": "${user.phonenumber}",
"DEPARTMENT": "${user.departmentname}",
"E_MAIL": "${user.customproperty37}"
},
"SNC": {
"PNAME": "p:EMAIL=${user.customproperty37}, CN=${accountName}"
}
}
(Some irrelevant parts redacted)
It works fine but not for updating SNC. When customproperty37 changes on user E_MAIL gets update correctly, but not SNC PNAME.
We also tried this:
"SNC": {
"GUIFLAG": "U",
"PNAME": "p:EMAIL=${user.customproperty37}, CN=${accountName}"
}
and can see that GUIFLAG is successfully updated. But not PNAME.
What could be the reason?
Solved! Go to Solution.
12/20/2022 04:17 AM
Does snc is proper format i.e. same as create account json
12/20/2022 04:28 AM
Yes, same format works just fine during create.
12/20/2022 04:35 AM
Please share create account json
12/20/2022 04:46 AM
Full CREATEACCOUNTJSON:
{
"ADDRESS": {
"LASTNAME": "${user.lastname}",
"FIRSTNAME": "${user.firstname}",
"BUILDING_P": "${user.customproperty10}",
"TEL1_NUMBR": "${user.phonenumber}",
"DEPARTMENT": "${user.departmentname}",
"E_MAIL": "${user.email}"
},
"PASSWORD": {
"BAPIPWD": "${randomPassword}"
},
"LOGONDATA":{
"ACCNT": "${user.systemUserName}",
"GLTGV": "${user.startdate}",
"GLTGB": "${user.enddate}",
"CLASS":"${user.customproperty27}",
"USTYP": "A"
},
"COMPANY":{
"COMPANY": "REDACTED"
},
"SNC": {
"PNAME": "p:EMAIL=${user.customproperty37}, CN=${accountName}"
}
}
Full UPDATEACCOUNTJSON
{
"ADDRESS": {
"LASTNAME": "${user.lastname}",
"FIRSTNAME": "${user.firstname}",
"BUILDING_P": "${user.customproperty10}",
"TEL1_NUMBR": "${user.phonenumber}",
"DEPARTMENT": "${user.departmentname}",
"E_MAIL": "${user.customproperty37}"
},
"LOGONDATA":{
"GLTGV": "${user.startdate}",
"GLTGB": "${user.enddate}",
"CLASS":"${
if(user.customproperty24.equals('Terminated') ){
'Z_LEAVERS'
}else{
user.customproperty27
}
}",
"USTYP": "${
if( user.customproperty24 != null &&
user.customproperty24.equals('Terminated') ){
'L'
} else{
'A'
}
}"
},
"COMPANY":{
"COMPANY": "REDACTED"
},
"SNC": {
"PNAME": "p:EMAIL=${user.customproperty37}, CN=${accountName}"
}
}
12/20/2022 05:13 AM
12/20/2022 05:19 AM
This is state after create and unsuccessful update atempt:
12/20/2022 05:45 AM
12/21/2022 02:53 AM
You can see it in the screenshot. Just the domain of the mail address is redacted because it's possibly sensitive data. Only thing that will change during update is the mail prefix (before the @) Everything else stays the same.
12/21/2022 09:48 AM
using service account configure in saviynt are you able to update SNC from SAP directly without saviynt in picture,
12/22/2022 01:42 AM
We can't try directly since it's not a dialog user, but we did an authorisation trace to see if anything is rejected. Everything seems to be fine on authorisation side.
01/11/2023 05:53 AM
We've made it work. Turns out you can't seem to refer to accountName directly (although documented) but have to get it from the task:
"SNC": {
"PNAME": "p:EMAIL=${user.customproperty37}, CN=${task.accountName}"
}