A court on Thursday issued an opinion on a data-sharing agreement between the taxpayer agency and federal immigration authorities.