Thelin’s side took the lead in the 24th minute when Devlin rose highest to meet a corner from McGrath and head past Rae.
The visitors doubled their advantage on the hour mark when McGrath latched onto a through ball from Declan Gallagher and finished clinically past Rae.
St Johnstone were given a lifeline in the 74th minute when Molloy turned a low cross into his own net under pressure from Neilson.
The hosts pushed for an equalizer in the closing stages, but Aberdeen held firm to secure the victory.
Thelin’s impressive start to his tenure at Aberdeen continues, while St Johnstone will be disappointed not to have given their former owner a winning send-off.