The Economist's democracy index disagrees, putting Azerbaijan into the "Authoritarian" index. And apprently their President is in power since 2003, which is usually not a good sign.
Iran certainly cannot be called a full democracy, the religious council has to approve candidacies for President - it isn't even clear if the current President Rouhani can pose as a candidate!
But there are some Muslim democracies working better, like Indonesia and Malaysia.