When Azula and company infiltrate Ba Sing Se disguised as Kyoshi warriors (after Long Feng's imprisonment), there's a scene where Ty Lee and Mei "accidentally" talk about their infiltration too loudly. We see two Dai Li agents spying over them, and then they go to contact Long Feng.
Surprisingly, Azula was watching over those two Dai Li agents, saying something along the lines of "good job girls, I'm sure they will deliver the message".
This of course means that Azula knows that the Dai Li are still loyal to Long Feng rather than the Earth King. But, how did she know that?
The closest clue I could think of is that when she introduced herself to the Earth King, he mentioned that Long Feng had tried to betray him using the Dai Li agents. But that doesn't really prove that the Dai Li are still on Long Feng's side.
Azula's plan was risky, because the Dai Li could have reported the information to the king instead.
What guaranteed Azula that the Dai Li were still loyal to Long Feng rather than the Earth King?