OPINION OF THE COURT
Alexander, J.Petitioner Betsy Scherbyn appeals by leave of this Court from an order of the Appellate Division which affirmed Supreme Court’s dismissal of her CPLR article 78 proceeding seeking review of the determination of respondent Wayne-Finger Lakes Board of Cooperative Educational Services (BOCES) dismissing her from a probationary typist position.
In affirming the determination below, the Appellate Division characterized this proceeding as in the nature of "mandamus to compel petitioner’s reinstatement to [the position of typist]” and concluded that petitioner failed to demonstrate her entitlement to reinstatement. That court observed, as did Supreme Court, that she was not entitled to reinstatement because by operation of Civil Service rules, she had resigned from her position (162 AD2d 967). We now reverse.
I
In September 1986, petitioner was appointed by BOCES to a *756probationary civil service typist position. The following January she applied for and was granted a leave of absence from the typist position so that she could accept a temporary position as a data entry operator. This leave of absence was approved by respondent Georgia Delaney, the Personnel Officer of Ontario County. In August of that year, she was appointed to a probationary position as data entry operator where she remained until January 1988 when she applied for and was granted a leave of absence from the probationary data entry operator position to enable her to accept a provisional appointment as data control clerk. Delaney also approved this leave of absence.
BOCES thereafter, in September 1988, terminated petitioner’s provisional data control clerk appointment, reinstated her as a data entry operator and immediately terminated her from that position. BOCES then reinstated petitioner to her formally held typist position and filed a personnel change with Delaney, requesting approval of petitioner’s reinstatement to the typist position. Upon the advice of the New York State Department of Civil Service, Delaney declined to approve the reinstatement because petitioner “vacated the position of Typist when she accepted a Leave of Absence from her probationary appointment as Data Entry Operator as it is impossible for an employee to encumber two positions.” Delaney stated that she would certify petitioner only if she were reappointed to the data entry operator position but not to the original typist position. Delaney refused BOCES’ request that she exercise her discretion and extend petitioner’s leave of absence, whereupon BOCES terminated petitioner, determining not to retain her in the data entry operator position.
Supreme Court dismissed petitioner’s article 78 proceeding challenging her termination by BOCES. Supreme Court concluded that the stated reason for petitioner’s termination— that she could not encumber two positions simultaneously— was arbitrary and capricious “since there is no provision in either the Civil Service Law or the Ontario County Civil Service Rules prohibiting simultaneous leaves of absence from two positions.” The court nevertheless held that under rule XX (1) of the Ontario County Civil Service Rules, invoked by respondents BOCES and Delaney for the first time in their answers to the petition, petitioner was deemed to have resigned from the typist position and thus was not entitled to be reinstated to that position.
*757The Appellate Division affirmed. It characterized this article 78 proceeding as in the nature of "mandamus to compel petitioner’s reinstatement to [the position of typist]” and noted that the rule limiting " 'judicial review of an [agency] determination * * * to the grounds invoked by the agency’ * * * is not applicable here” because "it is not a proceeding in the nature of certiorari to review a quasi-judicial determination of a quasi-judicial body following hearing.” (162 AD2d 967, 968.) Thus, the court concluded that Supreme Court properly decided the issues raised by respondents’ answers and correctly dismissed the petition.
II
a
The Appellate Division erred in characterizing this proceeding as in the nature of mandamus to compel. It is, rather, in the nature of mandamus to review, which differs from mandamus to compel in that a petitioner seeking the latter must have a clear legal right to the relief demanded and there must exist a corresponding nondiscretionary duty on the part of the administrative agency to grant that relief (see, CPLR 7803 [1]; Matter of Crain Communications v Hughes, 74 NY2d 626; Matter of Kupersmith v Public Health Council, 63 NY2d 904; Matter of City of Newburgh v Public Employment Relations Bd., 63 NY2d 793; Matter of De Milio v Borghard, 55 NY2d 216; Matter of Legal Aid Socy. v Scheinman, 53 NY2d 12; Matter of Police Conference v Municipal Police Training Council, 51 NY2d 810; see also, McLaughlin, Practice Commentaries, McKinney’s Cons Laws of NY, Book 7B, CPLR C7801:4, at 31).
In a proceeding in the nature of mandamus to review, however, a court examines an administrative action involving the exercise of discretion. Mandamus to review resembles certiorari, except that in a certiorari proceeding a quasi-judicial hearing normally is required and the reviewing court has the benefit of a full record. The standard of review in a certiorari proceeding is "substantial evidence” (see, CPLR 7803 [4]; Matter of 125 Bar Corp. v State Liq. Auth., 24 NY2d 174). In a mandamus to review proceeding, however, no quasi-judicial hearing is required; the petitioner need only be given an opportunity "to be heard” and to submit whatever evidence he or she chooses and the agency may consider whatever evi*758dence is at hand, whether obtained through a hearing or otherwise. The standard of review in such a proceeding is whether the agency determination was arbitrary and capricious or affected by an error of law. (See, CPLR 7803 [3]; Siegel, NY Prac § 558, at 874-875 [2d ed]; see also, Matter of 125 Bar Corp. v State Liq. Auth., supra; Matter of Colton v Berman, 21 NY2d 322; Matter of Ayers v Coughlin, 137 AD2d 300, 306, mod 72 NY2d 346; Carrion v Webb, 131 AD2d 806; Matter of Harlem Val. United Coalition v Hall, 80 AD2d 851, affd 54 NY2d 977; Graca v State Liq. Auth., 32 AD2d 879; Rochester Colony v Hostetter, 19 AD2d 250; see generally, 5 NY Jur 2d, Article 78 and Related Proceedings, § 78).
b
It is the settled rule that judicial review of an administrative determination is limited to the grounds invoked by the agency (Matter of Aronsky v Board of Educ., 75 NY2d 997). We have said that " '[a] reviewing court, in dealing with a determination * * * which an administrative agency alone is authorized to make, must judge the propriety of such action solely by the grounds invoked by the agency. If those grounds are inadequate or improper, the court is powerless to affirm the administrative action by substituting what it considers to be a more adequate or proper basis’ ” (see, Matter of Montauk Improvement v Proccacino, 41 NY2d 913; see also, Matter of Aronsky v Board of Educ., supra; Matter of Consolidated Edison Co. v Public Serv. Commn., 63 NY2d 424, appeal dismissed 470 US 1075; Matter of Parkmed Assocs. v New York State Tax Commn., 60 NY2d 935; Matter of Trump-Equitable Fifth Ave. Co. v Gliedman, 57 NY2d 588; Matter of Barry v O’Connell, 303 NY 46).
Because it concluded that this proceeding is in the nature of mandamus to compel, not a proceeding in the nature of certiorari to review a "quasi-judicial determination of a quasi-judicial body following a hearing”, the Appellate Division did not follow this settled rule. As we have noted, however, this proceeding is in the nature of mandamus to review, which is similar to certiorari. We perceive of no reason why the settled rule which limits judicial review of the determination of an administrative agency in certiorari proceedings to judging " 'the propriety of such [determination] solely by the grounds invoked by the agency’ ” (Matter of Montauk Improvement v Proccacino, supra) should not apply equally to mandamus to review proceedings.
*759ill
Here, petitioner neither claims a legal right to the typist position nor does she contend that the agency owes her any specific duty. Rather she seeks judicial review of BOCES’ determination removing her from that position, contending that her removal was arbitrary and capricious and affected by an error of law, inasmuch as it was unrelated to the performance of her job as typist and was not for misconduct. She alleges, without contradiction, that under the Civil Service Rules of Ontario County probationary employment may be terminated only "for incompetency or misconduct” (rule XV [8]) or "[i]f the conduct or performance of a probationer is not satisfactory” (rule XV [1] [e]). Although a probationary employee normally may be terminated for any reason, so long as the reason is not arbitrary and capricious (Matter of Talamo v Murphy, 38 NY2d 637), the more stringent and unique Ontario County Civil Service Rules circumscribe this general rule and limit the discharge of a probationary employee to the specific reasons set forth therein. Thus, the inquiry here is to determine whether the stated reason for petitioner’s termination is in accord with those rules.
The record demonstrates that the sole reason advanced by BOCES and the Ontario County Civil Service Personnel Officer for dismissing petitioner was that she "vacated the position of Typist when she accepted a Leave of Absence from her probationary appointment as Data Entry Operator” because it was "impossible for an employee to encumber two positions.”
Supreme Court correctly observed that dismissal for this reason was arbitrary and capricious since there is "no provision in either Civil Service Law or the Ontario County Civil Service Rules prohibiting simultaneous leaves of absence from two positions.” Thus, petitioner’s removal was without sound basis in reason and without regard to the facts (see, Matter of Pell v Board of Educ., 34 NY2d 222, 231; Matter of Rochester Colony v Hostetter, 19 AD2d 250, 253, supra). The alternative ground for her removal belatedly raised by the respondents and relied upon by the courts below may not serve to sustain her dismissal.
Accordingly, the order of the Appellate Division should be reversed, with costs, the petition granted, respondents directed to reinstate petitioner to the position of typist and the matter remitted to Supreme Court, Ontario County, for the computation of back pay and benefits.
*760Chief Judge Wachtler and Judges Simons, Kaye, Hancock, Jr., and Bellacosa concur; Judge Titone taking no part.
Order reversed, with costs, petition granted, respondents directed to reinstate petitioner to the position of typist, and matter remitted to Supreme Court, Ontario County, with directions to remand to respondents for further proceedings in accordance with the opinion herein.