Subverted: The Grand Vizier of Tropia seems to be loyal to his king...
Double Subverted: ...but he isn't good. The king is also evil and working for him allows the vizier to subjugate and torture the populace more effectively.
Parodied: The Vizier is not nice, but he's a poodle-pokingHarmless Villain who's only being bad because he's "supposed to" (like the necromancer in Unseen Academicals). He's not really trying to take over, he's more likely to put salt in the king's coffee than poison, he drives heroes away with cruel practical jokes or bizarre threats rather than genuine harm, and the court, including the king, see him as their Token Evil Teammate.
The Grand Vizier of Tropia seems to be disloyal, but is later revealed to be loyal and the signs of disloyalty were coincidental. However, the king he is loyal to is bad, so the heroes think they have to get rid of both of them...until the vizier pulls a Starscream and then reveals he was Good All Along and overthrew the king in order to Pay Evil unto Evil, becoming a much fairer ruler once he's actually on the throne.
Or, there are multiple viziers in the story with different alignments.
Not, however, anything to do with this Zig Zag who plays the trope straight.
Enforced: The story is written in a strict monarchy where it is forbidden to depict kings as evil, but the author still wants his hero to fight against unjust authority.
Lampshaded: The Grand Vizier throws a visiting hero into the dungeon for no reason. The hero turns to his cellmate and says "You know, once I saw the Grand Vizier I was sort of expecting this."
Invoked: The Grand Vizier is a good man, but his populace don't respect him. He assumes Machiavelli was right, and attempts to seem more evil so that they will fear him instead.
Exploited: The Grand Vizier's assistant is aware of his master's evil nature, and uses that to arrange his own schemes, knowing everyone will just assume the Vizier is behind it.
Defied: The Grand Vizier knows that people think he's evil, and spends most of his time finding ways to run the kingdom fairly and even pet a few dogs so that they'll stop thinking that.
Discussed: Hero Sir Tropesalot is talking with his Five-Man Band about how they should be careful in kingdoms because every time they've run into a Grand Vizier he's been evil.
Conversed: Political candidate Thomas Roper talks to his campaign team about finding a trustworthy running mate and mentions how it would be easier if the real-world evil viziers were as obvious as the fictional ones.
Deconstructed: The Grand Vizier is originally good and does his best to follow his king's orders, but the people never think ill of their king and, because this trope exists in the world they blame the Vizier for any of the King's mistakes, while not giving him any credit for things the government does right. As a result, he's a very bitter and resentful character.
Reconstructed: His bitterness leads him to hate the King, becoming the evil vizier that everyone already thought he was.