I got a use case where we need to import user identities through “.csv” bulk import in ForgeRock Identity cloud and assign users the organization while doing so. I don’t know how to automatically assign users to the organization. I require suggestion from you guys how to achieve this.
Hi @Suriya
To do that, I think I’ll extend the user schema to store the name of the Org of the user and then using an OnCreate event script I would use this Org name value to link the user to the Org Object.
Cheers,
Steph.
Thank you so much for response… if possible can you provide me a sample script to do this operation. Since I am new to this scripting it would be great helpful. Thanks in advance
If you’re using IDM, browse to Managed objects definition and select the tab “script”, on this page select OnCreate event and enter a script similar to this:
var orgID = object.orgID
var patchedUser = openidm.patch("managed/alpha_user/" + object.username, null, [{
"operation":"add",
"field":"/memberOfOrg/-",
"value":{"_ref":"managed/alpha_organization/"+orgID+"","_refProperties":{}}
}]);
I have tried the script suggested by you along with links to refer…even though I tried some modifications like you suggested, still its failing. I have spent my entire time till now and couldn’t implement it.
I kindly request if possible, can you provide me the tested script. I am also working and will update if I found some solution. Anyone who can up with same use case can provide ur suggestion also it is appreciated.
Thanks for ur effort.
Hi @stephane.orluc ,
It seems like ForgeRock doesn’t allow to set value to organization object since I am new to IDM product and I am not sure is that true/not, could you please provide me the solution. It would do great help. Thanks in advance.
It seems that @stephane.orluc has resolved your original query regarding how to assign organizations to user identities via bulk import in Identity Cloud. I’m glad we could help with that! However, the conversation has naturally evolved into a new topic regarding relationship management based on organization names.
We generally prefer to keep threads on topic to make it easier to link and reference other comments and posts, and to keep discussions focused and easy to find.