If you want to have Vivienne as Divine, do the following. Else, do the complete opposite (risking to losing her friendship). I do it in this manner for it's easyer to say what causes her to be Divine. Of course, if you are unhappy with what happens, you can always just go to the Dragon Age Keep and unlock spoilers, then set anyone as Divine for any future titles.
-Conscript the mages (or ally the templars and then discourage Cassandra at any point you can).
-Tell her that you think mages should be allowed into the chantry after you complete Champions of the Just or In Hushed Whispers.
-Ask her about what is her standard for The Divine when she mentiond you musn't appear a commoner in Skyhold.
-Have Celene alive (if possible, use your high cort approvak to ask her to spare Gaspard's life). Note that having Celene dead will practically ruin her chances as Divine if you did not conscript the mages.
-Use the nobility knowledge perk to support her in private dialogue after Wicked Eyes and Wicked Hearts. Then do the subsequent war table operation.
-Exile the wardens at Adamant.
-It is rumored you sould drink from the Well of Sorrows but i do not believe that, because ultimately, all 3 candidates would wish you to drink from it (unless you have Cassandra rommanced).