In both query your condition is that enddate is null and you yourself have said that you are setting enddate flag during termination then according to your logic aggregation will definitely not pick this account as the condition enddate is null is not satisfying.
If your ask is even after setting enddate you should get this user then you may add a union condition with your existing query, something like below that I have given below. You may adjust the logic to filter terminated record from target.
(SELECT … FROM TermDB where and enddate is null) UNION (SELECT … FROM TermDB where and enddate is not null and status='terminated').
Please note that for the above logic to work properly you should not have any overlapping data.
If I not getting the issue correctly then please point out.
Install this plugin in your environment - it will give you endpoint identityiq/plugin/rest/Operation/Aggregate
this will start single account aggregation to your app - I have some idea why it may not work but wanted to check first if via plugin it would
Account deletion only happens after full aggregation (with the right setting turned on). It is not invoked after get object. Aggregation loads all accounts and then deletes the links that were were not present in the aggregation. Imagine what would happened if that process was invoked after getObject
IIQ detects 1 account but 99 are not detected - as it is single account aggregation
99 links are removed by detection process
That’s why both - Delta Aggregation and Get Object does not check for removed accounts.
In the plugin I gave to you there is however some kind of custom aggregator which is removing link object if it cannot be returned from the connector so you may try to use it.