UNSAccountBInUNSGroupB in target system when XIsInEffect is set to false does not remove role when synchronizing

Hello,
I am configuring leaver flow. I configure the UNS and AD account definition to be retained when user is inactive and not to retain roles on manage level. For AD everything works OK. ADSAccountInADSGroup gets flag XIsIneffect set to false and group membership is removed in AD. Was expecting same behavior for UNS, but is not the case. I implemented a custom process for remove event for UNSAccountBInUNSGroupB, updated the logic to take into account the flag XIsInEffect. When I enter a leaving date on a Person and start the process 'Lock user accounts from dismissed employees.' all is OK for AD (as explained) and I indeed see that the custom removal process is triggered and the AdHocProjection step is executed. But in the end the role membership is not removed in the target system.
The provisioning for the UNS target system is correctly configured because role assignment and removal from the IT Shop correctly yields role membership assignment and removal.
I understand that it requires some specific logic because when a role (or group) membership is not in effect it actually still exists and adhoc projection would indeed decide that nothing needs to be done.
Thank you in advance for your advice.
Regards.
Mrs. Wilke Jansoone

Parents Reply
  • If Not CBool(Connection.Variables("FULLSYNC")) AndAlso $FK(UID_UNSAccountB).FK(UID_UNSRootB).NamespaceManagedBy:String$.Equals("VISYNC",StringComparison.OrdinalIgnoreCase) Then
    	Try
    		Dim evt as String = EventName
    		Select Case evt.ToUpperInvariant()
    			Case "ASSIGN", "HANDLEOUSTANDING"
    				evt="Insert"
    			Case "REMOVE"
    				evt="Delete"
    		End Select
    		
    		If evt = "Delete" Then
    			Dim thePatch = EntityPatch.Create(Entity, Session.MetaData(), DiffMode.AllContent)
    			thePatch.Diff.Data.State = EntityState.ToDeletePhysical Or EntityState.Loaded Or EntityState.Deleted
    			values("Patch") = thePatch.ToXml()
    		Else
    			values("Patch") = DPR_WrapObjectForProjection(Entity)
    		End If
    	Catch ex as Exception
    		values("AdHocDataFound") = False
    	End Try
    End If

    I just came across this same issue still with 8.1.5. To help someone with typing later... here is the text version (worked for me):

Children
No Data