cancel
Showing results for 
Search instead for 
Did you mean: 

IPS - saving a custom attribute

MarcoDebattisti
Participant
0 Kudos
2,187

Hi,

we are live with IAS with SuccessFactors as Source system and IAS as Target system.

We have a requirement to save custom attribute 2 in IAS with the user id and a prefix 'HI_'.

I added custom transformations in the Source system like this:

{

"sourcePath": "$.userId",

"targetPath": "$['urn:sap:cloud:scim:schemas:extension:custom:2.0:User']['attributes'][1]['value']",

"functions": [

{

"type": "concatString",

"prefix": "HI_"

}

]

},

{

"constant": "customAttribute2",

"targetPath": "$['urn:sap:cloud:scim:schemas:extension:custom:2.0:User']['attributes'][1]['name']"

},

Then I added the following custom transformations in the Target system:

{

"sourcePath": "$.userSysID",

"targetPath": "$['urn:sap:cloud:scim:schemas:extension:custom:2.0:User']['attributes'][1]['value']",

"functions": [

{

"type": "concatString",

"prefix": "HI_"

}

]

},

{

"constant": "customAttribute2",

"targetPath": "$['urn:sap:cloud:scim:schemas:extension:custom:2.0:User']['attributes'][1]['name']"

},

when I run a sync job, all employees are ending in error when writing to IAS, with this error:error=com.sap.security.iag.provisioning.mapping.exceptions.InvalidJsonContentException: Source path: $.userSysID is not available in content, but is required in defined system transformation Caused by: com.sap.security.iag.provisioning.mapping.MandatorySourcePathNotFoundException: Source path: $.userSysID is not available in content, but is required in defined system transformation Caused by: com.jayway.jsonpath.PathNotFoundException: No results for path: $['userSysID'],
The good thing is that the custom attribute 2 seems filled in correctly:

but I am not able to save it, for sure something wrong in the target transformations.

Any help that you can give me is appreciated!

thanks

Marco

Accepted Solutions (1)

Accepted Solutions (1)

MarcoDebattisti
Participant

Hi,

I think I managed to sort it out 🙂

I removed the custom transformation in the Source system and just left the standard one for userName:

then I added this custom transformation in the IAS Target:

seems to work:

there are still a couple of things that I need to verify but seems promising!

Marco

dsouzadylan44
Explorer
0 Kudos
Hi Marco, were you able to get it working with userid feild?
ahonsheng
Explorer
0 Kudos
Hey Marco, I'm current stuck doing the same process as you but instead of $userName as a source im using workforce SCIM API custom fields. have you done something similar?

Answers (3)

Answers (3)

MarcoDebattisti
Participant
0 Kudos

Hello Rodin,

Both UserId and Username are added to sf.user.attributes but still I am getting the error.

I believe that the source transformation is fine - I am currently testing with Username as source path and concatenate it with a prefix and then save it in custom attribute 2:

the error happens in the write operation on the target system so for sure the target transformations are wrong because all employees are failing with the same error Source path: $.username is not available in content, but is required in defined system transformation

Note that the Username will be saved in the Login name as per the standard, then I want to transform it and save it to custome attribute 2, but I don't know how to write it apparently 😞

I am thinking to create a custom field in SF (with some business rule to default the prefix) and then import the custom field in a custom attribute directly, but if it is possible to avoid it even better

thanks for any idea, I appreciate the help 🙂

Marco

MarcoDebattisti
Participant
0 Kudos

Hello Rodin, thanks for your reply.

I tried many different transformations but I am still getting the same error.

You're right, userSysID was not added to sf.user.attributes. However I changed it to UserId (which is added in sf.user.attributes) and I get the same error: Source path: $.userId is not available in content, but is required in defined system transformation

My objective is to take the userID, concatenate it like HI_userID and save it in custom attribute 2.

thanks

Marco

RE
Explorer
0 Kudos

Hi, Marco,

Please add & keep EACH user attribute to sf.user.attributes which raises an error "is not available in content". Otherwise the attribute can not be referenced in the transformation.

Best regards,
Rodin

RE
Explorer
0 Kudos

Hi, Marco,

As " Source path: $.userSysID is not available in content", is this attribute specified in the sf.user.attributes property to be read from SF ?

Best regards,
Rodin