Set IIQ disabled to true through rule

Hi all,

I am trying to Set IIQ disabled to true through rule. I am using the link.setIiqDisabled to make it go red but saving the lonk and identity object is not working. It is still green

Can someone help?
image

Thanks in advance.

put the commitTransaction at end

add on above solution,

You can use lock and unlock if you are making such change.

Recommendation on context.saveObject or context.commitTransaction - Compass

Lock IdentityIQ objects before modification (code sample) - Compass

Hello @rishavghoshacc,

Instead of setIiqDisabled, try using the β€œaLink.setAttribute("IIQDisabled", true);”

Place context.commitTransaction(); after context.saveObject(identity);

Also tell me,

  • Which account are you trying to disable (AD or Something)?
  • Which rule is being used (Identity Creation Rule, Correlation Rule, Provisioning Rule, etc.)?
  • Which endpoint is involved in this process?

Let me know these things

Thank You,
Raju

4 Likes
for (String singleIdentity : identitylist)
  {
    Identity identity = context.getObjectByName(Identity.class, singleIdentity);
    List appLinks = identity.getLinks();

    if(appLinks!=null)
    {
      for (Link aLink : appLinks)
      {

        if(aLink!=null @and aLink.getApplicationName()!=null)
        {
          if(aLink.getApplicationName().equals(appAccount))
          {
            aLink.setAttribute("IIQDisabled",true);
            context.saveObject(aLink);
            context.commitTransaction();
            break;
           }
      }
    }
  }