
894 A.2d 219 (2006)
Robert Anthony LeGRANDE, Petitioner
v.
COMMONWEALTH of Pennsylvania, DEPARTMENT OF CORRECTIONS, SCI Laurel Highlands Records Supervisor Rhonda J. Stairs, Pennsylvania Board of Probation and Parole, Respondents.
Commonwealth Court of Pennsylvania.
Submitted on Briefs January 6, 2006.
Decided March 10, 2006.
*221 Robert Anthony LeGrande, petitioner, pro se.
Vincent R. Mazeski, Asst. Counsel, Camp Hill, for respondents.
BEFORE: PELLEGRINI, Judge, and SIMPSON, Judge, and KELLEY, Senior Judge.
OPINION BY Judge SIMPSON.
Before this Court in our original jurisdiction are the preliminary objections of the Pennsylvania Department of Corrections (DOC) to a petition for review in the nature of mandamus filed by inmate Robert A. LeGrande, representing himself. LeGrande asks this Court to direct DOC to credit his new state robbery sentence for time he served in federal prison.
In his mandamus petition, LeGrande avers the following facts. In January 1994, while on both federal and state parole, LeGrande was arrested and charged with robbery. On November 14, 1995, LeGrande entered a negotiated plea agreement on the pending state robbery charge. Under the agreement, LeGrande received a 6 to 20 year sentence. Also, the trial court ordered LeGrande's new state sentence to run concurrently with any other sentence he was currently serving.
The Pennsylvania Board of Probation and Parole (Board) subsequently revoked LeGrande's state parole and recommitted him to serve the unexpired term on his prior state robbery conviction. Shortly thereafter, LeGrande's federal parole was also revoked, and DOC remanded him to federal custody so he could complete his commitments under his federal sentence.
Upon reparole from the federal sentence, LeGrande was returned to state custody on December 18, 1998, to begin serving his state backtime. State credit for the period of time LeGrande spent in federal custody is in question here.
DOC subsequently issued a recalculation order indicating LeGrande's state backtime began to run upon his return to state custody, and his new state robbery sentence would begin to run following completion of his backtime for the prior state robbery sentence. DOC's order also refused to credit LeGrande's new state robbery sentence with the time he served in federal prison.
Various proceedings ensued. These allegedly included a 2004 letter from an acting superintendent to the state sentencing judge inquiring about the intent of the concurrent sentence, and a subsequent hearing before the state sentencing judge during which he confirmed his intent that the new state robbery sentence be concurrent with any other sentence being served at the time.
Claiming DOC improperly calculated his new state sentence, LeGrande filed a petition for review in the nature of mandamus in 2005. LeGrande's petition seeks an order directing DOC to recalculate his new state robbery sentence in accordance with *222 the trial court's concurrent sentencing order by providing credit for time he served in federal prison. In response, DOC filed preliminary objections challenging this Court's jurisdiction and the legal sufficiency of LeGrande's petition.
DOC first argues this Court lacks jurisdiction to entertain LeGrande's petition because he failed to exhaust all available administrative remedies before seeking judicial review. Specifically, DOC contends LeGrande failed to timely challenge the recalculation of his new state sentence, and, therefore, may not file a petition for review after his right to pursue an administrative appeal expired.
There is no question an inmate must exhaust all available administrative remedies before seeking redress from the courts. St. Clair v. Bd. of Prob. & Parole, 89 Pa.Cmwlth. 561, 493 A.2d 146 (1985). The doctrine requiring the exhaustion of administrative remedies preserves the integrity of the administrative process by requiring the administrative agency charged with broad regulatory and remedial powers to address issues within its expertise before judicial review attaches. See Muir v. Alexander, 858 A.2d 653 (Pa. Cmwlth.2004). As such, a court is without power to act until all administrative remedies have been exhausted. Village Charter Sch. v. Chester Upland Sch. Dist., 813 A.2d 20 (Pa.Cmwlth.2002).
Here, it is unclear from the face of the petition that LeGrande failed to exhaust available administrative remedies. To the contrary, the petition contains approximately 30 numbered paragraphs addressing LeGrande's unsuccessful attempts to gain the benefit of his negotiated plea agreement in state court. These averments reveal a timely and consistent pursuit for the recalculation of his new state robbery sentence through multiple grievances, administrative appeals, and civil actions. The efforts culminated in a February 7, 2005 hearing before the state sentencing judge on a habeas corpus petition. At this hearing, the state sentencing judge confirmed to a DOC records supervisor his intent for concurrent sentences. Amended Petition for Review, ¶ 70.
Under the facts as pled, we are unable to determine that LeGrande failed to exhaust all available administrative remedies before filing the instant action. As a result, DOC's first preliminary objection is overruled.
DOC next argues the sentencing order directing LeGrande's new state robbery sentence run concurrent with his federal sentence is illegal because it contravenes Section 21.1(a) of the Parole Act.[1] As the sentencing order is illegal, DOC maintains, LeGrande's petition fails to state a claim for mandamus.
In considering a demurrer, we must accept as true all well-pled material allegations in the petition for review, as well as all inferences reasonably deducible from the allegations. Aviles v. Dep't of Corr., 875 A.2d 1209 (Pa.Cmwlth.2005). A demurrer must be sustained where it is clear and free from doubt the law will not permit recovery under the alleged facts; any doubt must be resolved by a refusal to sustain the demurrer. Kretchmar v. Commonwealth, 831 A.2d 793 (Pa.Cmwlth. 2003).
A proceeding in mandamus is an extraordinary action at common law, *223 designed to compel the performance of a ministerial act or mandatory duty. Coady v. Vaughn, 564 Pa. 604, 770 A.2d 287 (2001). The purpose of mandamus is not to establish legal rights, but to enforce those rights already established beyond peradventure. Africa v. Horn, 701 A.2d 273 (Pa.Cmwlth.1997). This Court may only issue a writ of mandamus where the petitioner possesses a clear legal right to enforce the performance of a ministerial act or mandatory duty, the defendant possesses a corresponding duty to perform the act, and the petitioner possesses no other adequate or appropriate remedy. Coady. Mandamus can only be used to compel performance of a ministerial duty and will not be granted in doubtful cases. Doxsey v. Commonwealth, 674 A.2d 1173 (Pa.Cmwlth.1996).
Clearly, a writ of mandamus may lie to compel DOC to properly compute an inmate's prison sentence. Saunders v. Dep't of Corr., 749 A.2d 553 (Pa.Cmwlth. 2000); Doxsey. "No one, however, has a right, and this Court, indeed, lacks the authority to compel an illegal act." Doxsey, 674 A.2d at 1175. Thus, mandamus is not available to compel calculation of an inmate's sentence that was illegal when originally ordered by the trial court. Doxsey.
Section 21.1(a) of the Parole Act governs the order in which sentences and backtime are served. It mandates sentences for crimes committed on parole must be served consecutively with time remaining on original sentences, and, thus, prohibits the imposition of concurrent sentences under these circumstances. See Commonwealth v. Dorian, 503 Pa. 116, 468 A.2d 1091 (1983); Vance v. Pennsylvania Bd. of Prob. & Parole, 741 A.2d 838 (Pa. Cmwlth.1999); Walker v. Pennsylvania Bd. of Prob. & Parole, 729 A.2d 634 (Pa. Cmwlth.1999).
Here, the new state robbery sentence was imposed for acts occurring while LeGrande was on parole from a prior state robbery sentence. Under the cited provision of the Parole Act, LeGrande cannot serve his new state robbery sentence before he satisfies the prior state robbery sentence.
However, Section 9761(b) of the Sentencing Code, 42 Pa.C.S. § 9761(b), informs our analysis of the impact of the federal sentence. That section specifically addresses sentences imposed by other sovereigns, and it provides in pertinent part (with emphasis added):
(b) SENTENCES IMPOSED BY OTHER SOVEREIGNS.If the defendant is at the time of sentencing subject to imprisonment under the authority of any other sovereign, the court may indicate that imprisonment under such other authority shall satisfy or be credited against both the minimum and maximum time imposed under the court's sentence. If the defendant is released by such other authority before the expiration of the minimum time imposed by the court, he shall be returned to a correctional institution of the Commonwealth to serve the time which remains of the sentence. If the defendant is released after the minimum time has elapsed, he shall be considered for parole on the same basis as a prisoner who has served his minimum time in a correctional institution of the Commonwealth. If the defendant is released after the maximum time imposed under the sentence of imprisonment he shall be deemed to have served his sentence.
Id. Under this provision, a sentencing judge is empowered to grant credit on a state sentence for time served by a prisoner under an existing out-of-state or federal sentence.
*224 The interplay between the cited provisions of the Parole Act and the Sentencing Code was recently addressed in Griffin v. Dep't of Corr., 862 A.2d 152 (Pa.Cmwlth. 2004). That case, like the present case, dealt with state parole backtime, an existing federal sentence, and a new state sentence. We concluded that where the new state sentence was expressed to run concurrently with an existing federal sentence, concurrent credit against the new state sentence could be awarded under the Sentencing Code despite the provision of the Parole Act. Accordingly, we overruled DOC's preliminary objections to a complaint in mandamus. Griffin controls here, and it compels the same result.
DOC strenuously argues that Griffin was wrongly decided and invites us to revisit the decision. We do not believe the decision was erroneous, for several practical reasons. First, the decision is supported by the clear language of the Sentencing Code.
Second, Griffin is limited to the relatively uncommon situation of contemporaneous sentences in Pennsylvania and elsewhere. The holding clearly does not apply to situations involving only Pennsylvania sentences. It permits a sentencing judge to partially shift the cost of confinement away from Pennsylvania, thereby attaining a salutary efficiency.
Third, the holding in Griffin assists trial judges. The holding affords greater flexibility to a judge in the complex process of sentencing where multiple offenses against multiple sovereigns are involved. Also, such cases are usually further complicated by the unavailability of the offender. The holding in Griffin allows a trial judge in the proper case to accept plea agreements and thereby expedite resolution of charges. The response to recidivism in the limited circumstances of contemporaneous sentences from multiple sovereigns is not to hamper the trial judge; rather, the remedy is for the Board to take failure on parole into account in determining backtime.
Here, LeGrande pleads that the sentencing judge intentionally ordered his new state robbery sentence to run concurrently with existing sentences, including his known federal sentence. Also, he offers proof of this claim. Under the circumstances, he pleads a claim for mandamus relief, and the demurrer is overruled.
Accordingly, we overrule DOC's preliminary objections.

ORDER
AND NOW, this 10th day of March, 2006, the preliminary objections filed by the Department of Corrections are OVERRULED, and Respondents shall file an Answer to the amended petition for review.
NOTES
[1]  Act of August 6, 1941, P.L. 861, added by Section 5 of the Act of August 24, 1951, P.L. 1401, as amended, 61 P.S. § 331.21a(a).
