Prepare the Onions: In a large skillet, heat the olive oil over medium heat. Add the sliced onions and cook, stirring frequently, for about 20-25 minutes until they are soft and caramelized. Add the ground sumac, allspice, cinnamon, black pepper, and salt, and stir to combine. Remove from heat and set aside.
Cook the Chicken: Preheat your oven to 375°F (190°C). Rub the chicken thighs with a little olive oil, and season them with salt, pepper, and an additional sprinkle of sumac. Place the chicken thighs in a baking dish and roast for 35-40 minutes, or until the skin is golden brown and the chicken is cooked through (internal temperature of 165°F/74°C).
Prepare the Bread: While the chicken is cooking, place the flatbread on a large baking sheet. Drizzle with olive oil and spread the caramelized onion mixture evenly over the bread. Once the chicken is done, place the cooked chicken thighs on top of the onion-covered flatbread.
Final Bake: Return the baking sheet to the oven and bake for an additional 10 minutes, allowing the bread to absorb the flavors and become slightly crispy.
Serve: Remove from the oven and garnish with toasted pine nuts and fresh parsley. Serve the Chicken Musakhan hot, cutting the flatbread into pieces so each person gets some chicken and onions with their portion.