The Massachusetts Supreme Judicial Court will hear the investigation brought by Attorney General Maura Healey into Facebook and how the company shares data. The hearing comes two years after news broke that an app developer had misappropriated data from millions of Facebook users and sold it to a company called Cambridge Analystica for use in the 2016 Presidential Election, which led to a flurry of investigations into whether other bad actors had gained access to private data from Facebook. GBH Morning Edition host Joe Mathieu spoke with Northeastern University and GBH News legal analyst Daniel Medwed to discuss the case. The transcript below has been edited for clarity.

Joe Mathieu: What led to this dispute between Facebook and our attorney general's office? What is this really about?

Daniel Medwed: So here's the back story. After that Cambridge Analytica scandal broke, Facebook hired a number of outside lawyers to conduct an internal investigation into whether there were other potential security breaches — had other app developers similarly misused consumer data? Simultaneously, the Massachusetts attorney general's office was concerned that these security breaches could imperil Massachusetts residents. So they started their investigation, and they asked for help from Facebook. Specifically, they wanted information about the identity of the app developers that this internal investigation by outside lawyers happened to be targeting. Facebook balked; they didn't want to turn over this information, citing the attorney-client privilege because of the involvement of these outside counsel, and also something known as the work product doctrine, which shields information that's developed in anticipation of litigation. Complicated technical back story, but it goes to an important public policy point: to what extent may the government get access to company information and data to right a public wrong when that information and data was produced, in part, by lawyers? That's really the issue.

Mathieu: OK, how did it get all the way to the SJC, though? Did a judge or a court ever allow the attorney general to access the info?

Medwed: Yes, so here's the scoop. The AG's office filed what's called a civil investigative demand, or CID, with Facebook asking for a whole bunch of information. Facebook largely complied, except for all of this material concerning the internal investigation. That led the AG to request an order to compel compliance, and they filed that petition with the Superior Court, which is the Massachusetts trial court. And a superior court judge basically agreed with the AG and ordered Facebook to turn over this material. Facebook did not want to comply, so they sought an appeal. And now we're with the SJC.

Mathieu: So Facebook is claiming that this internal investigation generated protected information. What's the AG's legal argument that her office then should have access to it?

Medwed: Well, it's basically a two part argument. First, that Facebook failed to establish that the outside counsel investigation qualifies as work product — that this really wasn't done in anticipation of litigation, but it was more of a PR campaign to assure a wary public that Facebook's platform was safe. In fact, Facebook publicized a lot of these internal investigative findings. Second, and relatedly, the AG is claiming that the attorney-client privilege doesn't apply. It's very narrow. The privilege only protects confidential communications that are made for the purpose of rendering legal advice. And according to the AG's office, this internal investigation was wide ranging, it was made public and exceeds the scope of the attorney-client privilege.

Mathieu: Any thoughts, I have to ask, on how the SJC might rule?

Medwed: I'm not entirely sure. On the one hand, I think we need a robust, vibrant attorney-client privilege to protect all of us — not just big corporations like Facebook — from the far reaching hand of the government that could intrude on our privacy. We need to have the privilege. But on the other hand, we don't want companies to hide information that the government could use to right a really important public wrong simply because some lawyers were involved in generating it. For what it's worth, the Superior Court judge did side with the attorney general's office way back when, and sometimes the SJC defers a little bit to those lower court decisions. So we'll just have to wait and see.