Skip to main content

NetIQ IDM - Strip unwanted group member values from current operation


This code example shows how to remove unwanted group members from current operation based on some business logic.


Optimization group members add to avoid  "ALREADY_EXIST_VALUE" kind of errors. when IDM engine fails to do so.

Here I am doing look up in AD for members, and for each added member from IDM if user is already member of AD group, i am just striping out current member value from the current operaiton.


<do-set-local-variable name="group-dn" scope="policy"> <arg-string> <token-src-dn /> </arg-string> </do-set-local-variable> <do-set-local-variable name="group-members" scope="policy"> <arg-node-set> <token-dest-attr class-name="Group" name="Member" /> </arg-node-set> </do-set-local-variable> <do-trace-message> <arg-string> <token-text xml:space="preserve">NUMBER OF MEMBERS GROUP =&gt; </token-text> <token-xpath expression="count($group-members)" /> </arg-string> </do-trace-message> <do-for-each> <arg-node-set> <token-op-attr name="Member" /> </arg-node-set> <arg-actions> <do-set-local-variable name="current-member" scope="policy"> <arg-string> <token-local-variable name="current-node" /> </arg-string> </do-set-local-variable> <do-trace-message> <arg-string> <token-text xml:space="preserve">CURRENT MEMBER =&gt; </token-text> <token-local-variable name="current-node" /> </arg-string> </do-trace-message> <do-if> <arg-conditions> <and> <if-local-variable mode="src-dn" name="group-members" op="equal">$current-member$</if-local-variable> </and> </arg-conditions> <arg-actions> <do-strip-xpath expression="modify-attr[@attr-name=&quot;Member&quot;]/add-value/value[text()=$current-node]" /> </arg-actions> <arg-actions /> </do-if> </arg-actions> </do-for-each> <do-strip-xpath expression="modify-attr[@attr-name='Member']/add-value/value[not(text())]" />

Comments

Popular posts from this blog

My own developed - Active Directory Cache Inspector for AD Driver Novell Identity manager

Sometimes there is a need for us (Consultants) to see a snapshot of all the changes that happened on the Active directory side while the Novell AD IDM driver was stopped or was not running, before we decide to start the AD driver. Since Novell Identity Manager currently allows us to see all the events which happened in the Identity vault only, but not on the AD side, I decided to write such a tool myself, and of course wanted to share this tool with the consultants/community out there. It's a .NET 2.0 WinForm application, written in C# programming language. To run this tool you should have at minimum: .NET 2.0 framework installed, ( Not supported on the Linux platforms yet) This application must be run under the same user which is configured on the AD driver. Short Tutorial (How To): When you run the application (ADCView.exe), the application automatically discovers the current domain, a domain controller, and default domain naming context in the user logged in domain automatically

NetIQ IDM - How to read Component type data from Query nodeset done from command transformation

Suppose query: <do-set-local-variable name="local.sub.ctp.QueryContacts" scope="policy"> <arg-node-set> <token-query class-name="User" scope="entry"> <arg-match-attr name="UPN"> <arg-value type="string"> <token-src-attr class-name="User" name="UPN"/> </arg-value> </arg-match-attr> <arg-match-attr name="contacts"> <arg-value type="string"> <token-text xml:space="preserve">get-contacts</token-text> </arg-value> </arg-match-attr> <arg-match-attr name="userid"> <arg-value type="string"> <token-association/> </arg-value> </arg-match-attr> </token-query> </arg-node-set> </do-set-local-variable> Outpu