The Second Circuit Court of Appeals at the federal level ruled that the metadata collection program "exceeds the scope of what Congress has authorized" and is therefore not supported by law, i.e. illegal. This happened on May 7th, 2015 and is public record.
It was illegal then and it's illegal now. The circuit court didn't say "as of May 7th, 2015 this is illegal"; they said that the NSA exceeded the scope of surveillance authorized by Congress in October of 2001.
You claimed the metadata collection program was "written about at length" and viewed as "OK". This is evidence from the judicial branch of the US government it is not, in fact, viewed as okay.