The Permissible and Impermissible Types of Differing
Compiled from the statements of Shaykh al-Islām Ibn Taymīyyah (d. AH 728), Imām al-Saʿdī (d. AH 1376), and contemporary scholars like al-ʿAllāmah Ibn al-ʿUthaymīn. A brief explanation of what types of differing are allowed in Islām, and what types are not.
Yes, whosoever opposes the clear Book and the beneficial Sunnah, or that which the pious predecessors of this Ummah had ijmāʿ (consensus) upon, opposing it without a justifiable excuse, then such a person has acted with the action of the innovators.
Shaykh Ibn lbraaheem – raḥimahullāh– (d.1389H) – said: “Ahl al-Sunnah wal-Jamāʿah have uṣūl (fundamentals) which are firmly based upon proofs; and upon this are built the furoo’ (subsidiary issues).” 
GUIDELINES REGARDING DIFFERENCES:
Imām al-Saʿdī (d.1376H) – raḥimahullāh– said:
“Differences of opinions that occur between the (Scholars) of the Ummah are from two angles:- Firstly: Differences in the furoo’ (subsidiary issues), and in issues of ijtihād (qualified striving to reach the truth); such that when a person - whether it is a judge, muftī, writer, or teacher – strives to arrive at a ruling and is correct, he is rewarded two-fold. But if he strives and is mistaken, then he is rewarded once. Secondly: Differences in matters of uṣūl (fundamentals); such as the issues related to Allāh’s Attributes, al-Qadar (Predestination and Pre-Decree), īmān (faith), and their like. These cause those who oppose (such uṣūl) to be regarded as deviants, because of them opposing the proofs from the Book and the Sunnah, and that which the Salaf al-Ṣāliḥ (Pious Predecessors) – the Companions and those who followed them in goodness – were agreed upon.” 
THE PERMISSIBLE TYPE OF DIFFERING:
Shaykh Ibn al-ʿUthaymīn – hafiẓahullāh– said:
“This sect (the Saved-Sect) unites upon the truth, even if its people do have differences of opinion between themselves. However, these differences do not harm their (unity), nor cause them to declare each other as deviants. Rather, their hearts are still united, even when these differences of opinion occur in matters linked to the ʿaqīdah (beliefs); such as did the Prophet (ṣallallāhu ʿalayhi wa-sallam) see his Lord with his eyes, or did he not see him (with his eyes)? Or is the punishment in the grave to the body and the soul, or just to the soul only? Or other such issues. This is because these issues are subsidiary issues connected with the uṣūl, they are not the actual uṣūl itself. So they do not declare each other as being deviants when they differ in such matters – contrary to what the innovators do.” 
THE PROHIBITED TYPE OF DIFFERING:
Ibn Taymīyyah (d.728H) – raḥimahullāh– said:
“The Scholars – from the Companions, the Tābi’īn, and those who came after them – when they differed in any matter, then they followed the Command of Allāh – the Most High – in His saying:
“If you differ in anything amongst yourselves then refer it back to Allāh and His Messenger, if you do truly believe in Allāh and the Last Day. That is better and more suitable for final determination.” [Sūrah al-Nisāʾ 4:59].
So they would discuss concerning the issue; discuss, consult and sincerely advise. Sometimes they would differ in matters linked to the ʿaqīdah, as well as issues linked to actions, yet along with such differences, they still preserved the unity and brotherhood.
Yes, whosoever opposes the clear Book and the beneficial Sunnah, or that which the Pious Predecessors of this Ummah had ijmāʿ (consensus) upon, opposing it without a justifiable excuse, then such a person has acted with the action of the Innovators.
As regards differing in matters of rulings and actions, then the examples are too many to be recorded. So if every Muslim who differed in something were to be boycotted and abandoned, then no unity or brotherhood would ever remain. And Abū Bakr and ʿUmar –
raḍī Allāhu ʿʿʿanhumā – who were the best of the Muslims – used to differ in matters, but they did not intend except good.
And the Prophet (ṣallallāhu ʿalayhi wa-sallam) said to his Companions on the day of [the expedition to] Banu Quraydhah:
“Let none of you pray ʿAṣr except when you reach Banu Quraydhah.’’
So the time for the ʿAṣr Prayer came during the journey, so one group amongst them said: We will not pray until we reach Banu Quraydhah; so they missed the actual time for ’ʿAṣr. The other group said: We will not miss it by delaying the Prayer; so they prayed along the way. And the Prophet (ṣallallāhu ʿalayhi wa-sallam) did not criticize any of the two groups. This is related by al-Bukhārī and Muslim, from Ibn ʿUmar.  So this differing was in a matter related to rulings and actions, not in the important uṣūl (fundamentals) itself.” 
 Fatāwá lil-Lajnatud-Daa‘imah lil-Buhoothul-’Ilmiyyah wal-Iftaa (no. 830).
 Tanbīhātul-Lateefah (p. 93).
 Sharḥ al-ʿAqīdah al-Wāsiṭiyyah (1/53).
 Related by al-Bukhārī (no.946) and Muslim (no. 1770).
 Majmūʿ al-Fatāwá (24/172-174), slightly abridged.