Something else to consider here would be some kind of batching. A system doing this check should group users together by instance and make a single call to that instance. Something like: "Hey, I have this list of users from your instance. Are they all still active? A, B, C, D..." Reply: "From your request, here is the list of users that I found in my database: A, D". Now the calling system would know it should remove all data for users B & C.
Something else to consider here would be some kind of batching. A system doing this check should group users together by instance and make a single call to that instance. Something like: "Hey, I have this list of users from your instance. Are they all still active? A, B, C, D..." Reply: "From your request, here is the list of users that I found in my database: A, D". Now the calling system would know it should remove all data for users B & C.