This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CSV Dynamic roles assignment Import via Script

Dear community,

I am working for a customer who wants to migrate from Quest One IM v6 to One Identity v7.1.2. In v6 he has a script, which imports the assignments for Dynamic Roles (Table DynamicGroup). It is realized via script and not via CSV-DataImporter, because an assignment of ADSGroups is realized, too.

In v6 the part of the script for reference between Org and DynmicGroup looks like this (marked yellow):

' Resolver to get column data from import data

Dim columnObjectClass As IResolveImportValue = New ResolveImportValueSimple("ObjectClass")

 

' Build a dictionary: The last parameter forces exceptions when duplicate keys are found

Dim columnUID_Org As New ResolveImportValueHashed( _

Connection, _

ObjectWalker.ColDefs(table, "FK(UID_Org).ShortName"), False)

Dim columnWhereClause As IResolveImportValue = New ResolveImportValueSimple("WhereClause")

Dim dictWhereClause As New Dictionary(Of String, String)

In v7 I tried it this way (marked yellow):

' Resolver to get column data from import data

Dim columnObjectClass As IResolveImportValue = New ResolveImportValueSimple("ObjectClass")

 

' Build a dictionary: The last parameter forces exceptions when duplicate keys are found

Dim columnUID_Org As New ResolveImportValueHashed( _

Connection, _

ObjectWalker.ColDefs(table, "FK(ObjectKeyBaseTree).ShortName"), False)

 

Unfortunately I receive following failure message in the Debugger:

ViException Column DynamicGroup.ObjectKeyBaseTree is not a foreign key column.

 

I´ve alredy found a similar article, but unfortunately this one is for the DataImporter:

https://www.quest.com/community/products/one-identity/f/identity-manager/21146/bulk-import-business-roles-with-dynamic-query/58785#58785

 

Can someone please support me in this case?

 

 

Thanks in advance and best regards

Niko

  • Hi Niko,

    as ObjectKeyBaseTree is a dynamic foreign key that can point to many tables you need to specify the target table in your ObjectWalker path.

    In your example it would be as the following, assuming that your dynamic group should be assigned to a business role.

    ObjectWalker.ColDefs(table, "FK(ObjectKeyBaseTree),Org.ShortName")

  • Hi Markus,

    thanks for the suggestion. I´ve tried it that way, but unfortunately I receive following failure message:

    ViException: Column DynamicGroup.ObjectKeyBaseTree is not a foreign key column.

    Here the Details:

    Maybe this makes it more transparent.

     

    Thanks and best regards

    Niko

  • I used the code in my test environment and it worked but my version is higher than your 7.1.2. But as the error message seems to be the same as before, did you add the ",Org" to your object walker path as this was not present before?

    If so I suggest contacting support.
  • Hello Markus,

    yes, i added the ",Org.ShortName" after you`ve suggested it.

    Ok, then I`m going to contact the support with reference to this questions.


    Thanks and best regards
    Niko