That is exactly how it works when you are deployed in aid to civil powers in Canada, Kilted.
For Octoberfest (FLQ crisis), the troops in Quebec answered to the Crown in right of Quebec, that is the Lt-Governor as advised by the Premier, under the supervision of the Quebec Minister of Justice...