You’ll have three conversation with Miranda on the Citadel provided she survived the Suicide Mission in Mass Effect 2. Although the first conversation won’t matter, the second and third conversations will have requirements that must be met, otherwise she’ll die.
This’ll be during your second conversation with her, after the Mission: Priority Citadel, and requires that you’ve either read the dossier on Kai Leng that you’ll get from Anderson, or you kept her loyal during her loyalty mission The Prodigal.
This’ll happen in your third conversation with her, she’ll ask you for Alliance resources, you must accept her wishes, otherwise she’ll die. Also, if she is your Romance option, you mustn’t break up with her, as that will become another requirement.
Choice: Requirements Met
If you’ve met all the requirements listed above, after dealing with Henry after Mission: Priority: Horizon, Miranda will survive the fight against Kai Leng. Be careful with your dialogue choice, because, if you pick the choice “I just want Oriana” after it, she can still die due to Henry shooting her, so make sure you interrupt him when the Renegade prompt appears.
Choice: Requirements Not Met
Failing all the requirements listed above will result in her dying from her injuries that she sustained in the fight with Kai Leng.