corrected flow from tenant to endpoints
improvememtns