Reconciling the hadiths “The son of Adam offends Me…” and “O My slaves, you can never do Me any harm…”
Question

How can we reconcile between the words of Allah, may He be exalted, in the hadith qudsi, “O My slaves, you can never do Me any harm…” and His words in another hadith, “The son of Adam offends Me. He inveighs against time (ad-dahr), but I am time, the control of all things is in My hand, I alternate the night and day”? Please give a straightforward answer so that I may understand it well and be able to teach it to others, if Allah wills.
Praise be to Allah.In the hadith of Abu Hurayrah (may Allah be pleased with him), it says: The Messenger of Allah (blessings and peace of Allah be upon him) said: “Allah, may He be glorified and exalted, says: ‘The son of Adam offends Me. He inveighs against time (ad-dahr), but I am time, the control of all things is in My hand,  I alternate the night and day.’” Narrated by al-Bukhaari (4826) and Muslim (2246).
This does not contradict what is narrated in the hadith of Abu Dharr, from the Prophet (blessings and peace of Allah be upon him), who narrated that Allah, may He be blessed and exalted, said: “O My slaves, you can never do Me any harm and you can never bring Me any benefit.” Narrated by Muslim (2577).
The fact that there is no contradiction is clear from the following:
-1- Imagining a connection between offence and harm, and believing that they are interconnected, is only applicable in the case of human beings, who are weak and incapable by nature. In the case of Allah, however, nothing is like unto Him.
Ibn al-Qayyim (may Allah have mercy on him) said:
The concept of offence in relation to Allah, may He be glorified, is not like offence in relation to people, just as His wrath, His anger and His hatred are not like those of people. End quote from as-Sawaa‘iq al-Mursalah (4/1751).
Thus this is akin to the concept of anger. In the case of human beings, anger that results from the behaviour of others could harm a person. But Allah, may He be exalted, has pointed out that if someone angers Him, that does not harm Him.
Allah, may He be glorified and exalted, says, describing the people of disbelief and apostasy (interpretation of the meaning):
“That is because they followed what angered Allah and disliked [what earns] His pleasure, so He rendered worthless their deeds” [Muhammad 47:28].
Even though they angered Allah, may He be exalted, with their disbelief and bad deeds, they will never be able to harm Him, as He, may He be exalted, says (interpretation of the meaning):
“Indeed, those who disbelieved and averted [people] from the path of Allah and opposed the Messenger after guidance had become clear to them - never will they harm Allah at all, and He will render worthless their deeds” [Muhammad 47:32].
-2- The word adha (translated here as offence) is used with regard to that which is light in impact and does not reach the level of harming the one to whom it is directed.
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said:
One should pay attention to the fact that the word adha (offence), in linguistic terms, refers to something of which the impact is light and its negative effect is weak, as was mentioned by al-Khattaabi and others. It is indeed as he said, and examining the religious texts confirms that, such as the verse in which Allah, may He be exalted, says (interpretation of the meaning):
“They will not harm you except for [some] annoyance [adha]” [Aal ‘Imraan 3:111].
Hence Allah says (interpretation of the meaning):
“Indeed, those who offend [yu’dhoona] Allah and His Messenger” [al-Ahzaab 33:57].
And He says, according to the hadith qudsi: “The son of Adam offends Me. He inveighs against time (ad-dahr).”
And the Prophet (blessings and peace of Allah be upon him) said: “Who will deal with Ka‘b ibn al-Ashraf? For indeed he has offended Allah and His Messenger.” And he said: “No one is more patient in bearing the offence that he hears than Allah, may He be glorified and exalted. They ascribed to Him an equal and they ascribed to Him a son, yet still He grants them well-being and provision.” And Allah, may He be glorified, says in the hadith qudsi: “O My slaves, you can never do Me any harm…” And Allah, may He be glorified, says in His Book (interpretation of the meaning): “And do not be grieved, [O Muhammad], by those who hasten into disbelief. Indeed, they will never harm Allah at all” [Aal ‘Imraan 3:176].
This verse explains that people can never harm Allah, may He be glorified, by their disbelief, but they offend Him, may He be blessed and exalted, when they inveigh against the One Who controls all things, and ascribe to Him a son or a partner, or they offend and insult His Messengers and His believing slaves.
End quote from as-Saarim al-Maslool (2/118-119).
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said:
Offence does not necessarily lead to harm. A person may be offended by hearing or seeing something deplorable, but he is not harmed by that. He may be offended by unpleasant smells, such as onions and garlic, but he is not harmed by that. Hence Allah affirms in the Qur’an that offence occurs, as He, may He be exalted, says (interpretation of the meaning):
“Indeed, those who offend Allah and His Messenger - Allah has cursed them in this world and the Hereafter and prepared for them a humiliating punishment” [al-Ahzaab 33:57].
In the hadith qudsi, He says: “The son of Adam offends Me. He inveighs against time (ad-dahr).” But He has stated that nothing can harm him, as He, may He be exalted, says (interpretation of the meaning): “Indeed, they will never harm Allah at all” [Aal ‘Imraan 3:176]. And in the hadith qudsi, He says: “O My slaves, you can never do Me any harm…”
End quote from al-Qawl al-Mufeed (2/241).
Shaykh ‘Abdullah ibn ‘Aqeel (may Allah have mercy on him) said:
With regard to reconciling these two hadiths, there is no contradiction between them, praise be to Allah, because adha (offence) has a lighter impact than harm, and there is not necessarily any connection between them. Adha is mentioned in the Holy Qur’an, as in the verse in which Allah, may He be exalted, says (interpretation of the meaning):
“Indeed, those who offend Allah and His Messenger - Allah has cursed them in this world and the Hereafter …” [al-Ahzaab 33:57].
Allah, may He be glorified and exalted, is offended by what is mentioned in the hadith, even though it is not possible for any harm to reach Him from His slaves, as He, may He be exalted, says (interpretation of the meaning):
“And do not be grieved, [O Muhammad], by those who hasten into disbelief. Indeed, they will never harm Allah at all” [Aal ‘Imraan 3:176].
And He, may He be exalted, says (interpretation of the meaning):
“And he who turns back on his heels will never harm Allah at all” [Aal ‘Imraan 3:144].
And the Prophet (blessings and peace of Allah be upon him) used to say in his khutbah: “And whoever disobeys them both – meaning Allah, may He be exalted, and His Messenger (blessings and peace of Allah be upon him) – harms no one but himself and does not harm Allah at all.”
End quote from Fataawa Ibn ‘Aqeel (2/273).
And Allah knows best.