It is makrooh for the imam to single himself out in joint supplication to the exclusion of the people praying behind him
Question

                If the imam prays for himself during congregational prayer, is it considered to be a betrayal of the people praying behind him? Is that permissible, or must we pray for the members of the congregation?.
Praise be to Allah.What is meant by the du'aa' 
    in which the imam and the people praying behind him all take part in a 
    congregational prayer is where the imam says the du’aa’, and the people 
    behind him say ameen. This is the case in which it is makrooh for the imam 
    to single out himself in du'aa' to the exclusion of the people praying 
    behind him. That is because of the report narrated from Thawbaan (may Allaah 
    be pleased with him), who said: The Messenger of Allaah (blessings and peace 
    of Allaah be upon him) said: “There are three things which it is not 
    permissible for anyone to do: a man should not lead people in prayer and 
    single himself out for du'aa' to the exclusion of them, and if he does that 
    then he has betrayed them; and he should not look into a house before asking 
    permission, and if he does that then he has entered; and he should not pray 
    when he needs to relieve himself until he has done so.” 
Narrated by Abu Dawood (no. 
    90) and al-Tirmidhi (37); he said the hadeeth of Thawbaan is a hasan hadeeth. 
This hadeeth was classed as 
    weak by Ibn Khuzaymah, Shaykh al-Islam Ibn Taymiyah, Ibn al-Qayyim and 
    others. 
See Da’eef Abi Dawood 
    by Shaykh al-Albaani (12, 13). 
If we assume that the 
    hadeeth is sound, then what it means is what we mentioned at the beginning: 
    singling himself out for mention in a du'aa' which he shares with the people 
    praying behind him. 
Shaykh al-Islam Ibn 
    Taymiyah (may Allaah have mercy on him) was asked about the words of the 
    Prophet (blessings and peace of Allaah be upon him): “a man should not lead 
    people in prayer and single himself out for du'aa' to the exclusion of them, 
    and if he does that then he has betrayed them” -- is it mustahabb for the 
    imam, every time he offers du'aa' to Allaah, glorified and exalted be He, to 
    include the people praying behind him? Is it related in a saheeh report from 
    the Prophet (blessings and peace of Allaah be upon him) that he singled 
    himself out in du'aa' during his prayer to the exclusion of them? How can we 
    reconcile between these two? 
He answered: 
It is proven in 
    al-Saheehayn from Abu Hurayrah (may Allaah be pleased with him) that he 
    said to the Prophet (blessings and peace of Allaah be upon him): When you 
    are silent between the takbeer and recitation, what do you say? He said: “Allaahumma 
    baa’id bayni wa bayna khataayaaya kama baa’adta bayna al-mashriqi 
    wa’l-maghrib. Allaahumma naqqini min khataayaaya kama yunaqqa al-thawb 
    al-abyad min al-danas. Allaahumma ighsilni min khataayaaya bi’l-thalji 
    wa’l-maa’i wa’l-barad   (O Allaah, put a great distance between me and 
    my sins, as great as the distance You have made between the East and the 
    West. O Allaah, cleanse me of sin as a white garment is cleansed from filth. 
    O Allaah, wash away my sins with snow and water and hail).”  
This is a saheeh hadeeth 
    which clearly states that he prayed for himself alone when he was acting as 
    an imam. Similarly, there is the hadeeth of ‘Ali concerning the opening 
    du’aa’, which begins: “ I turn my face to the One Who created the heavens 
    and the earth”, in which it says, “forgive me for no one forgives sin except 
    You, and guide me to the best of attitudes for the one guides to the best of 
    them except You, and divert bad deeds from me, for no one diverts bad deeds 
    from me except You.”  
Similarly, it is proven in
    al-Saheeh that he used to say after raising his head from bowing: “No 
    one can withhold what You have given, and no one can give what You have 
    withheld.” 
All these hadeeths, which 
    refer to his du'aa' after the tashahhud, are narrated in the singular, such 
    as his words: “Allaahumma inni a’oodhu bika min ‘adhaabi jahannam wa min 
    ‘adhaab il-qabri wa min fitnat il-mahyaa wa’l-mamaat wa min sharri fitnat 
    il-maseeh il-dajjaal (O Allaah, I seek refuge with You from the torment 
    of Hell and from the torment of the grave and from the trials of life and 
    death and from the evil of the trial of the Dajjaal).”.” 
the same applies to his 
    du'aa' between the two prostrations, which is mentioned in al-Sunan 
    in the hadeeth of Hudhayfah and in the hadeeth of Ibn ‘Abbaas, and in both 
    cases the Prophet (blessings and peace of Allaah be upon him) was leading 
    the prayer, on one occasion leading Hudhayfah and on the second occasion 
    leading Ibn ‘Abbaas.. 
According to the hadeeth of 
    Hudhayfah, he said, “Lord forgive me, Lord forgive me,” and according to the 
    hadeeth of Ibn Abbaas, he said: “Forgive me, have mercy on me, guide me, 
    pardon me, and grant me provision” and so on. 
These hadeeths which appear 
    in the books of Saheeh and Sunan, indicate that in these 
    places the imam may say du’aa’ in the singular. Similarly, scholars are 
    agreed on that, as they were of the view that this type of du'aa' is 
    prescribed. 
Once this is understood, it 
    will become clear that what is meant in the hadeeth mentioned -- if it is 
    sound -- is the du'aa' in which the person praying behind the imam says 
    ameen, such as du’aa’ al-Qunoot, when if the person says ameen then he is 
    saying du’aa’. Allaah, may He be glorified and exalted, said to Moosa and 
    Haroon (interpretation of the meaning: “Verily, the invocation of you 
    both is accepted” [Yoonus 10:89]. And one of them was sayng the du’aa’ 
    and the other was saying ameen. 
If the person praying 
    behind the imam is saying ameen to the du'aa' of the imam, then the imam 
    should offer the du’aa’ in the plural form, as in the du’aa’ of al-Faatihah,
    “Guide us to the Straight Way”. The person praying behind the imam of 
    says ameen because he believes that the imam is offering du’aa’ for both of 
    them together, so if he does not do that then the imam has betrayed the 
    person praying behind him. 
As for the places in which 
    each person offers supplication on his own behalf, as in the opening du’aa’, 
    following the tashahhud and so on, where the person praying behind the imam 
    is offering supplication for himself, then the imam may offer supplication 
    for himself. End quote. 
Majmoo’ al-Fataawa 
    (23/116-118) 
Al-Iraqi (may Allaah have 
    mercy on him) said:    
Part of the etiquette of 
    supplication is that the one who offers du'aa' in a gathering should not 
    single himself out for du'aa' among them, or single himself and some of them 
    out but not all of them. All the members of the congregation should be 
    included in the du’aa’ by the imam, so he should not single himself out to 
    the exclusion of the people praying behind him, because of the report 
    narrated by Abu Dawood and al-Tirmidhi from the hadeeth of Thawbaan (may 
    Allaah have mercy on him) who said: The Messenger of Allaah (blessings and 
    peace of Allaah be upon him) said: “A man should not lead people in prayer 
    and single himself out for du'aa' to the exclusion of them, and if he does 
    that then he has betrayed them.” al-Tirmidhi said: it is a hasan hadeeth. 
The apparent meaning is 
    that this is to be understood as referring to that in which the people 
    praying behind him do not take part in saying the du’aa’, such as du’aa’ 
    al-Qunoot and the like. As for that which everybody says, such as saying 
    between the two prostrations, “O Allaah forgive me and have mercy on me and 
    guide me,” each of the people praying behind him says this du’aa’, so there 
    is nothing wrong in that case with saying it in the singular. But some of 
    the people praying behind him may omit that because they forget or they do 
    not know this is mustahabb. In that case the imam should make the pronoun 
    plural.  End quote. 
Tarh al-Tathreeb 
    (2/136-137) 
And Allaah knows best.