How do I manage memberOfOrg through IDM transformation script

I have a sync mapping for importing/updating users from an AD LDS instance into Identity Cloud. I need to assign these users to an organization in IDC through this mapping. I found examples of mananging organization membership through onCreate, onUpdate, postCreate hooks. But want to do this in the sync mapping. Is this possible? If so, a sample transformation script would be helpful to understand how to make it happen.

If you are planning to add users to an organization based on a particular source property, then a transformation script like this should work:

[{ "_ref": "managed/<<org name>>/" + source }]

1 Like

Thank you. That provided what I needed. The actual transformation used is : [{ “_ref”: “managed/alpha_organization/47d94a79-1c5f-495b-89d9-095e3e55d7eb” }]

The orgID needs to be used instead of the orgName. I my case, all users in the mapping are going to the same org. It might be possible to send to different Organzations based on some source criteria by doing an openidm.query to get the orgID desired, then replacing the GUID in the example above with a variable. This meets my need but time to experiment further for future possibilities…

2 Likes