Yes, but with dictators you have a single point to which you can apply pressure.
There’s a “single point” in Iran, namely the Supreme Leader. But Obama chose to do his will.