Is it Sunnah to say Laa ilaaha ill-Allaah when parting from one’s friend?
Question

                It is the custom among some people when they meet and part for the first one to say when parting, “Laa ilaaha ill-Allaah,” then the other one responds “Muhammad rasool-Allaah.” Is this Sunnah? If it is not, then it is bid’ah?.
Praise be to Allah.Firstly: 
We do not 
    know of any saheeh (sound) or da’eef (weak) hadeeth which speaks of this 
    dhikr when parting or concluding a gathering. Hence persisting in it or 
    believing it to be a dhikr that is prescribed on such occasions is a bid’ah 
    that is be rejected, because the Prophet  (peace and blessings of Allaah 
    be upon him) said: “Whoever does any action that is not in accordance with 
    our affair will have it rejected.” Narrated by Muslim (1718). 
The scholars 
    have stated that singling out a particular time or place for an act of 
    worship, or a particular manner in which it is to be done, with no proof 
    from the texts, makes it a kind of bid’ah and innovation, in which case it 
    is called bid’ah idaafiyyah. It is prescribed in principle, but is rejected 
    because of the manner in which it is done. Acts of worship must be 
    prescribed in and of themselves, the manner in which they are done, the time 
    at which they are done and the number of times they are done, because Allaah 
    can only be worshipped in the ways that He has prescribed in His Book or on 
    the lips of the Messenger of Allaah  (peace and blessings of Allaah be 
    upon him). 
Al-Shaatibi 
    (may Allaah have mercy on him) said: Bid’ah, therefore, refers to a 
    fabricated religious way which competes with the way that is based on 
    sharee’ah, whereby following it is intended to go to extremes in devotion 
    and worship.
That also 
    includes adhering to certain ways and forms of worship, such as reciting 
    dhikr in unison, taking the day of the Prophet’s birthday as a festival, and 
    so on. 
It also 
    includes adhering to a specific act of worship at a specific time for which 
    there is no basis in sharee’ah, such as always fasting on the fifteenth of 
    Sha’baan and spending that night in prayer. 
End quote 
    from al-I’tisaam (1/37-39). 
See also the 
    answer to question no. 82559. 
Secondly: 
It is 
    prescribed to end a gathering by saying that which was narrated by Abu 
    Dawood (4859) from Abu Barzah al-Aslami (may Allaah be pleased with him) who 
    said: The Messenger of Allaah  (peace and blessings of Allaah be upon 
    him) used to say, when he wanted to leave a gathering: “Subhaanaka 
    Allaahumma wa bi hamdika, ashhadu an laa ilaaha illa anta, astaghfiruka wa 
    atoobu ilayk (Glory and praise be to You, O Allaah, I bear witness that 
    there is no god but You, I seek Your forgiveness and I repent to You).” And 
    he said: “It is expiation for whatever happened in that gathering.” 
Classed as 
    saheeh by al-Albaani in Saheeh Abi Dawood.  
It is also 
    prescribed for one of the people present to recite Soorat al-‘Asr when 
    ending the gathering, because of the report narrated by al-Tabaraani in 
    al-Awsat (5124) from Abu Madeenah al-Daarimi (may Allaah be pleased with 
    him) who was a companion of the Prophet  (peace and blessings of Allaah 
    be upon him). He said: When two men of the companions of the Prophet  
    (peace and blessings of Allaah be upon him) met, they would not part until 
    one of them recited “By Al‑‘Asr (the time), Verily, man is in loss” 
    [al-‘Asr] over the other, then one would say salaam to the other. 
    Classed as saheeh by al-Albaani in al-Silsilah al-Saheehah (no. 
    2648). 
Look at how 
    people have turned away from a proven Sunnah for the sake of the bid’ahs 
    that they have introduced, confirming the words of the Prophet  (peace 
    and blessings of Allaah be upon him): “No people introduce a bid’ah but 
    something equivalent will be taken away from the Sunnah.” Narrated by Ahmad 
    (16522). Al-Haafiz said in al-Fath (13/253): Its isnaad is jayyid. 
May Allaah 
    enable us and you to follow the Sunnah and avoid bid’ah. 
And Allaah knows best.