In a large resealable plastic bag, combine the baharat, sumac, cumin, coriander, preserved lemon rinds, garlic, chicken stock, olive oil, salt, and pepper. Seal the bag and gently massage everything together. Open the bag and toss in the chicken thighs and onions, reseal, and massage again to fully coat the chicken. Toss the bag in the fridge for at least 2 hours but preferably overnight to marinate, turning the bag once or twice.
Preheat the oven to 400°F (200°C).
Dump the chicken and the marinade in a large roasting pan and arrange the chicken, skin side up, on top of the onions. Roast until the chicken is golden brown and the juices run clear when pierced with a knife, 40 to 50 minutes.
Ladle the chicken, sauce, onions, and lemon onto mounds of rice or couscous.