Can you stun guards in Mission 5 without making Miller angry?

Solution 1:

Miller's behavior regarding the guards can occasionally be somewhat inconsistent in this level. Normally he will be happy with you if you achieve the Ghost bonus during this level (so, don't alert any guards as to your presence, regardless of whether you stun them or take them down). This also makes sense with the plot of the game at this point, as the tensions between the police force and TF29 would get worse if the police caught sight a TF29 agent sneaking around in their crime scene.

However, some users on Steam report issues with his angry dialogue triggering when it shouldn't. According to tests done by Steam User Machiavelli:

Ok, think I figured it. You cannot take out the pair of cops by the stairs by the ticket booth, by any means. Tried it plenty of diff ways.

Also, if you do take out a cop with the stun gun to the face and they immediately go down, no shaking or going into Suspicious, they know it was you.

So, in order to consistently avoid the dialog where Miller is unhappy with you, it's okay to stun or takedown most enemies as long as they don't see you, but it's best to avoid the initial pair of guards and to not stun guards when they're facing your direction (though I suspect that second part may be intended rather than a bug--it would make sense that a police officer who saw something immediately before being knocked out would be able to report on it after waking up).

Solution 2:

I was lucky enough to not delete all old save games, so I was able to give the mission another try. I ignored everything in the level except the main goal and stunning a random guard.

Miller was pleased, so it is allowed to stun guards. It is unclear if there is a limit or if I did something wrong in my first approach.