N.Y. CPL. LAW § 190.50 : NY Code - Section 190.50: Grand jury; who may call witnesses; defendant as witness

1.   Except as provided in this section, no person has a right to call
  a witness or appear as a witness in a grand jury proceeding.
    2.  The people may call as a witness in a grand  jury  proceeding  any
  person believed by the district attorney to possess relevant information
  or knowledge.
    3.    The  grand  jury  may cause to be called as a witness any person
  believed by it to possess relevant information or  knowledge.    If  the
  grand  jury  desires  to hear any such witness who was not called by the
  people, it may direct  the  district  attorney  to  issue  and  serve  a
  subpoena  upon  such witness, and the district attorney must comply with
  such direction.  At any time after such a direction, however, or at  any
  time  after  the  service of a subpoena pursuant to such a direction and
  before the return date thereof, the people may apply to the court  which
  impaneled  the  grand  jury  for  an  order  vacating  or modifying such
  direction or subpoena on the ground that such is in the public interest.
  Upon such application, the  court  may  in  its  discretion  vacate  the
  direction  or  subpoena,  attach  reasonable conditions thereto, or make
  other appropriate qualification thereof.
    4.  Notwithstanding the provisions of subdivision three, the  district
  attorney  may demand that any witness thus called at the instance of the
  grand jury sign a waiver of immunity pursuant to section  190.45  before
  being  sworn,  and  upon such demand no oath may be administered to such
  witness unless and until he complies therewith.
    5.  Although not called as a witness by the people or at the  instance
  of  the grand jury, a person has a right to be a witness in a grand jury
  proceeding under circumstances prescribed in this subdivision:
    (a)  When a criminal charge against a person is being or is  about  to
  be  or  has  been  submitted to a grand jury, such person has a right to
  appear before such grand jury as a witness in his own behalf  if,  prior
  to  the filing of any indictment or any direction to file a prosecutor's
  information in the matter, he serves upon the district attorney  of  the
  county  a  written  notice making such request and stating an address to
  which communications may be sent.  The district attorney is not  obliged
  to inform such a person that such a grand jury proceeding against him is
  pending, in progress or about to occur unless such person is a defendant
  who  has  been  arraigned  in  a  local  criminal court upon a currently
  undisposed of felony complaint charging an offense which is a subject of
  the prospective or pending grand jury proceeding.   In  such  case,  the
  district  attorney  must  notify  the  defendant  or his attorney of the
  prospective or pending grand jury proceeding and accord the defendant  a
  reasonable time to exercise his right to appear as a witness therein;
    (b)    Upon  service upon the district attorney of a notice requesting
  appearance before a grand jury pursuant to paragraph (a),  the  district
  attorney  must notify the foreman of the grand jury of such request, and
  must subsequently serve upon the applicant, at the address specified  by
  him,  a  notice  that he will be heard by the grand jury at a given time
  and place.  Upon appearing at such time and place, and upon signing  and
  submitting  to  the  grand jury a waiver of immunity pursuant to section
  190.45, such person must be permitted to testify before the  grand  jury
  and  to  give  any  relevant  and competent evidence concerning the case
  under consideration.   Upon giving  such  evidence,  he  is  subject  to
  examination by the people.
    (c)    Any  indictment or direction to file a prosecutor's information
  obtained or filed in violation of the provisions of paragraph (a) or (b)
  is invalid and, upon a motion made pursuant to section 170.50 or section
  210.20, must be dismissed; provided that a motion based upon such ground
  must be made not more than  five  days  after  the  defendant  has  been

  arraigned  upon  the  indictment  or,  as  the  case  may  be,  upon the
  prosecutor's information resulting from the grand  jury's  direction  to
  file  the same.  If the contention is not so asserted in timely fashion,
  it  is  waived  and  the  indictment or prosecutor's information may not
  thereafter be challenged on such ground.
    6.  A defendant or person against whom a criminal charge is  being  or
  is  about to be brought in a grand jury proceeding may request the grand
  jury, either orally or in writing, to cause a person designated  by  him
  to  be  called as a witness in such proceeding.  The grand jury may as a
  matter of discretion grant such request and cause  such  witness  to  be
  called pursuant to subdivision three.
    7.   Where a subpoena is made pursuant to this section, all papers and
  proceedings relating to the  subpoena  and  any  motion  to  quash,  fix
  conditions,  modify  or  compel  compliance shall be kept secret and not
  disclosed to the public by any public officer or public employee or  any
  other  individual  described  in  section 215.70 of the penal law.  This
  subdivision  shall  not  apply  where  the  person  subpoenaed  and  the
  prosecutor waive the provisions of this subdivision.
    This  subdivision  shall  not prevent the publication of decisions and
  orders made in connection with such proceedings or motions, provided the
  caption and content of the decision are written or altered by the  court
  to reasonably preclude identification of the person subpoenaed.