The social media giant said in a blog post Friday that spying on users violates privacy terms and that Facebook may take legal action.

After reports that employers were asking for passwords for social media sites of prospective employees, Facebook hit back saying that such moves were "alarming."

The social media giant said in a blog post Friday that businesses that ask for access to Facebook passwords of potential employees are violating its terms of service and possibly discrimination accusations, reported Politico.

"As a user, you shouldn’t be forced to share your private information and communications just to get a job," read the statement by Facebook's chief privacy officer, Erin Egan. "We don’t think employers should be asking prospective employees to provide their passwords because we don’t think it’s the right thing to do."

Wired reported that in June 2009, the city of Bozeman, Montana came under fire for demanding that potential public service workers hand over passwords to their social networking sites.

In another recent incident, a Canadian man was asked for his Facebook password during a job interview with the employer stating, "If you have something to hide, we don't have to go through with this process," reported the Calgary Herald.

In the statement, Facebook said that it may even pursue legal action if an employer violates privacy rights of users.

"We’ll take action to protect the privacy and security of our users, whether by engaging policymakers or, where appropriate, by initiating legal action, including by shutting down applications that abuse their privileges," read the statement.