Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

ServiceAccountType in CREATEACCOUNTJSON in S/4

Olesia
Regular Contributor
Regular Contributor

Hi,

do you know how to get a ServiceAccountType in CREATEACCOUNTJSON in S/4 connector?

For user's account the accoutType should be "A", but for service account we have the account type is selectable in ARS:

Olesia_0-1679494638350.png

 

The accountType attribute is neither in table arstasks nor in request_access.
However if I open a task in UI I see that it is there:

Olesia_1-1679494685893.png

 

I was trying to use in a connector the following variables, but non of them worked:
accounttype
accountType
ACCOUNTTYPE
task.accountkey.type - Cannot get property 'type' on null object
task.accounttype
task.accountType
task.ACCOUNTTYPE
requestAccess.accounttype
requestAccess.accountType
requestAccess.ACCOUNTTYPE

ServiceAccountOwnerMap.ServiceAccountType
ServiceAccountType

7 REPLIES 7

mayankshah
New Contributor III
New Contributor III

Could you please try the below options?

${accountTypeForServiceAccount} or

${endpoints.accountTypeForServiceAccount} or ${endpoint.accountTypeForServiceAccount}

As per the Saviynt doc, this accountTypeForServiceAccount is the available binding object for provisioning JSON.

Olesia
Regular Contributor
Regular Contributor

Hi,

-${accountTypeForServiceAccount} - no error, but accountType in SAP is still set as Dialog (A);

-${endpoint.accountTypeForServiceAccount} - no error, the account created with a type "B", but It is just a configuration of an endpoint and it doesn't provide the information what type was chosen in ARS. If we have two service account types chosen there, then there will be an error:

Olesia_0-1679567480784.png

Olesia_2-1679568117498.png

So, here is basically a basic question arises: how do you create service accounts from Saviynt?

 

 

 

 

DaanishJawed
Saviynt Employee
Saviynt Employee

Hi @Olesia ,

Thanks for reaching out.

Can you try with the below syntax?

 

${account?accounttype}

 

or

 

${arsTasks.accountType}

 

Also, please share your CreateAccountJson.

Document Reference - https://docs.saviyntcloud.com/bundle/SF-v2020x/page/Content/Configuring-the-Integration-for-Provisio...

Olesia
Regular Contributor
Regular Contributor

Hi, all of the proposed options failed:

${account?accounttype}
2023-03-27 07:50:59,533 [quartzScheduler_Worker-4] DEBUG println.PrintlnToLogger - Println :: | Error groovy.lang.GroovyRuntimeException: Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup failed:
SimpleTemplateScript61055.groovy: 22: expecting ':', found '}' @ line 22, column 35.
\"USTYP\": ${account?accounttype},

${account?.accounttype}
2023-03-27 07:54:17,431 [quartzScheduler_Worker-1] ERROR provisoning.SapProvisioningService - Error in each account from createAccountSAP:
groovy.lang.MissingPropertyException: No such property: account for class: SimpleTemplateScript61059
at SimpleTemplateScript61059.run(SimpleTemplateScript61059.groovy:1)

${arsTasks.accountType}
2023-03-27 07:58:20,723 [quartzScheduler_Worker-2] ERROR provisoning.SapProvisioningService - Error in each account from createAccountSAP:
groovy.lang.MissingPropertyException: No such property: arsTasks for class: SimpleTemplateScript61065
at SimpleTemplateScript61065.run(SimpleTemplateScript61065.groovy:1)

 Our CREATEACCOUNTJSON:

{
	"ADDRESS": {
		"LASTNAME": "${user.lastname}",
		"FIRSTNAME": "${user.firstname}",
		"E_MAIL": "${user.email}"
	},
  	"PARAMETER": {
		"SCL": 'X'###Upper and lower case in source code: 'X' = lower, ' ' =upper"
	},
	"ALIAS": {
		"USERALIAS": "${accountName}"
	},
	"DEFAULTS": {
		"DATFM": "1",
		"DCPFM": "X"
	},
	"SNC": {
		"PNAME": "p:CN=${accountName}@CORP.XXXX.COM",
		"GUIFLAG":  ""
	},
	"LOGONDATA": {
		"USTYP": "${ACCOUNTTYPE}",
		"CLASS": "${if(user.customproperty34=='Y') {'EXTC'} else if(user.costcenter!=null && user.costcenter.length() > 3) {user.costcenter.substring(0, 4)} else {''}}",
		"GLTGB":"${if(user.enddate!=null) {new java.text.SimpleDateFormat('yyyyMMdd').format(user.enddate)} else {'99991231'}}",
		"GLTGV":"${if(user.startdate!=null) {new java.text.SimpleDateFormat('yyyyMMdd').format(user.startdate)} else {new java.text.SimpleDateFormat('yyyyMMdd').format(new Date())}}",
		"CODVN": "X",
		"CODVC": "X",
		"CODVS": "X"
    },
}

 

Out of this documentation the following binding variables are supported and nothing seems to have the accountType:

  • task

  • user

  • TZONE

  • role

  • endpoint

  • accountName

  • requestAccess

It might be that the SAP connector does not have the variable accountType at all, could you please check your internal documentation and the supported variables for the connector?

Olesia
Regular Contributor
Regular Contributor

I came across with an enhancement idea related to this - https://ideas.saviynt.com/ideas/EIC-I-2754

Olesia
Regular Contributor
Regular Contributor

Hi @DaanishJawed ,

could you please confirm that the SAP connector does not have any way to detect a service account type chosen in a service account request?

Hi @Olesia

That is correct. Currently it is not supported.

Please follow up on the enhancement Idea with your CSM.

Thank you.