The legality of the UK's Investigatory Powers Act has been called into question by a landmark EU legal ruling on the 21 Dec 2016, which has restated that access to retained data must only be given in cases of serious crime.
The landmark judgment was handed down by the European Union's Court of Justice, setting a new precedent for EU member states' data retention regimes, stating that access to such data must be restricted to the purpose of preventing and detecting serious crime.
The ruling results partly from a legal challenge against DRIPA filed by two MPs, David Davis and Tom Watson, though Davis subsequently exited the complaint against the government following his appointment as the government's minister for exiting the EU.

The above was auto-summarised from the following article "Landmark EU Ruling: Legality of UK’s Investigatory Powers Act Challenged"