New York Attorney General Letitia James has launched an investigation into Facebook after the company said last week that it may have unintentionally collected the email contacts of up to 1.5 million people without their knowledge.

The mishap may have resulted in the contact information for hundreds of millions of individuals to be obtained improperly by the social media giant, James said.

“Facebook's announcement that it harvested 1.5 million users' email address books, potentially gaining access to contact information for hundreds of millions of individual consumers without their knowledge, is the latest demonstration that Facebook does not take seriously its role in protecting our personal information,” James said.

The company responded to the investigation in a statement Thursday afternoon, in which it said it was in contact with attorneys from James' office on the matter.

“We're in touch with the New York state attorney general's office and are responding to their questions on this matter,” Facebook said in a statement.

The information was allegedly used to improve targeted advertising for users, connect them to other individuals, and build Facebook's web of users, according to Business Insider, which first reported the practice last week.

Those contacts were apparently collected from people who chose to give Facebook the password to their email account when signing up for the social media service for the first time. Facebook used the method as a way to verify that the user actually owned that email address, the company said. It stopped doing so last month.

James noted in her announcement that it's not the first time the social media company has admitted to problems involving the data of its users. Earlier this month, for example, certain trend data on more than 500 million Facebook users was found to have been posted publicly by third-party application developers, according to cybersecurity firm UpGuard.

“It is time Facebook is held accountable for how it handles consumers' personal information,” James said. “Facebook has repeatedly demonstrated a lack of respect for consumers' information while at the same time profiting from mining that data.”

The company has been embroiled in repeated scandals in recent years involving the information and data of its users. Perhaps most notably was the revelation that British political consulting firm Cambridge Analytica had siphoned the personal information of millions of users from Facebook to use for campaign purposes, including the election of President Donald Trump.

Federal prosecutors in Brooklyn, meanwhile, are reportedly conducting a criminal investigation into some of the financial deals Facebook has made with companies to share the personal information of its users, according to The New York Times. No charges have been levied against officials at the company related to that probe as of yet.

READ MORE: