The phrase is informal and best used in casual conversation, not in formal settings like business or written official communications. I won't drop you in it when she asks about the party, don't worry.
Pro Tip 2/3
Negative Connotation
Using this phrase implies a negative outcome for someone, often due to sharing secretive or embarrassing information. By telling my boss about my lateness, you really dropped me in it.
Pro Tip 3/3
Accidental Revelation
Sometimes people 'drop somebody in it' unintentionally by revealing something they didn’t realize was a secret. I didn't mean to drop you in it when I mentioned your surprise visit to his birthday.