BundleDifference methods not providing right results

I am trying to check if two role objects are having same set of entitlements. I used BundleDifference class but the results are not accurate. Even if all entitlements are exactly same, the result is showing it has difference by returning true while using hasDifferences method. Below is the code that i tried.

Code

   RoleLifecycler rl = new RoleLifecycler(context);
  Bundle bns = context.getObjectByName(Bundle.class, "MyRole001");
  Bundle role= context.getObjectByName(Bundle.class, "MyRole002");
  BundleDifference bdiff = rl.diff(bns, role);
  return bdiff.getProfileDifferences();

Result

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE List PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<List>
  <ProfileDifference application="AD Access">
    <AttributeDifferences>
      <Difference attribute="Application" displayName="Application" oldValue="AD Access"/>
    </AttributeDifferences>
    <FilterDifference>
      <Difference oldValue="groups containsAll {&quot;SuperAdmin&quot;}"/>
    </FilterDifference>
  </ProfileDifference>
  <ProfileDifference application="SystemAccess">
    <AttributeDifferences>
      <Difference attribute="Application" displayName="Application" oldValue="SystemAccess"/>
    </AttributeDifferences>
    <FilterDifference>
      <Difference oldValue="groups containsAll {&quot;Director&quot;}"/>
    </FilterDifference>
  </ProfileDifference>
  <ProfileDifference application="AD Access">
    <AttributeDifferences>
      <Difference attribute="Application" displayName="Application" newValue="AD Access"/>
    </AttributeDifferences>
    <FilterDifference>
      <Difference newValue="groups containsAll {&quot;SuperAdmin&quot;}"/>
    </FilterDifference>
  </ProfileDifference>
  <ProfileDifference application="SystemAccess">
    <AttributeDifferences>
      <Difference attribute="Application" displayName="Application" newValue="SystemAccess"/>
    </AttributeDifferences>
    <FilterDifference>
      <Difference newValue="groups containsAll {&quot;Director&quot;}"/>
    </FilterDifference>
  </ProfileDifference>
</List>

hi @Aby_Kurian

Is it possible export xml object of both bundle objects?

It seems that profiles are different. One profile is associated to AD Access application and the other to SystemAccess application

By looking in the code of the RoleLifecycler (IIQ v8.3) :

The profiles are compared based on the IDs of the profiles in the bundles and if the same it starts looking at the entitlements.

I tested the code you provided with 2 roles, where the second role was cloned from the first one. This created a new Profile in the Bundle with a different IID (the entitlements have been created the same).


The ID are highlighted in yellow.

Can you validate if the IDs of the profiles of MyRole001 and MyRole002 are the same?

– Remold

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.