Probing the microenvironment of intracellular bacterial pathogens