N.Y. Tax Law § 1296
* § 1296. Secrecy of returns and reports. (a) Except in accordance with proper judicial order or as otherwise provided by law, it shall be unlawful for the commissioner, any officer or employee of the department, any person engaged or retained by the department on an independent contract basis, or any person who in any manner may acquire knowledge of the contents of a return or report filed with the commissioner pursuant to this article, to divulge or make known in any manner any particulars set forth or disclosed in any such return or report. The officers charged with the custody of such returns and reports shall not be required to produce any of them or evidence of anything contained in them in any action or proceeding in any court, except on behalf of the commissioner in an action or proceeding under the provisions of this chapter or in any other action or proceeding involving the collection of a state assessment fee due under this article to which the state or the commissioner is a party or a claimant, or on behalf of any party to any action, proceeding or hearing under the provisions of this article when the returns, reports or facts shown thereby are directly involved in such action, proceeding or hearing, in any of which events the court, or in the case of a hearing, the division of tax appeals may require the production of, and may admit into evidence, so much of said returns, reports or of the facts shown thereby, as are pertinent to the action, proceeding or hearing and no more. The commissioner or the division of tax appeals may, nevertheless, publish a copy or a summary of any decision rendered after a hearing required by this article. Nothing in this section shall be construed to prohibit the delivery to a person who has filed a return or report or to such person's duly authorized representative of a certified copy of any return or report filed in connection with such person's state assessment fee. Nor shall anything in this section be construed to prohibit the publication of statistics so classified as to prevent the identification of particular returns or reports and the items thereof, or the inspection by the attorney general or other legal representatives of the state of the return or report of any person required to pay the state assessment fee who shall bring action to review the state assessment fee based thereon, or against whom an action or proceeding under this chapter has been recommended by the commissioner or the attorney general or has been instituted, or the inspection of the returns or reports required under this article by the comptroller or duly designated officer or employee of the state department of audit and control, for purposes of the audit of a refund of any state assessment fee paid by a person required to pay the state assessment fee under this article. Provided, further, nothing in this section shall be construed to prohibit the disclosure, in such manner as the commissioner deems appropriate, of the names and other appropriate identifying information of those persons required to pay state assessment fee under this article.
(e)