In New York State, the law is that if one party to the conversation consents to its recording, then the recording is lawful.
You describe a "bug" which is a recording device to monitor conversations in an office. Without a proper eavesdropping warrant issued by a judge, the recording of a conversation between two people is unlawful if one party to the conversation does not consent. The same holds true with wiretapping a telephone line, cell phone, fax machine or text messages.
This answer is for informational purposes only and does not constitute legal advice.
f one person to the conversation consents, it is legal to record it. However, the purpose for the recording it may change that. If the intention is to blackmail, that changes the entire picture. Blackmail is a felony, and recording a conversation to create something by which someone can be blackmailed is a felony. If you haven't made such a recording, don't.
DISCLAIMER - THIS IS NOT LEGAL ADVICE, AND NO ATTORNEY-CLIENT RELATIONSHIP IS RELATED. THIS IS OFFERED AS AND IS INTENDED TO BE MERELY GENERAL INFORMATION.I