The prophet Isaiah tells us that God's Spirit is grieved when he is disobeyed:
9 In all their affliction he was afflicted,
and the angel of his presence saved them.
In his love and in his pity he redeemed them.
He bore them,
and carried them all the days of old.
10 But they rebelled
and grieved his Holy Spirit.
Therefore he turned and became their enemy,
and he himself fought against them.
Stephen in his speech to the Jewish council accuses both them and their ancestors of resisting the Holy Spirit when they killed the prophets and Jesus:
51 “You stiff-necked and uncircumcised in heart and ears, you always resist the Holy Spirit! As your fathers did, so you do.
When he is confessing the sin of his people, Nehemiah says that God uses his Spirit in the prophets to speak to them:
30 Yet many years you put up with them, and testified against them by your Spirit through your prophets. Yet they would not listen. Therefore you gave them into the hand of the peoples of the lands.
The apostle Paul warns the Ephesians not to grieve God's Holy Spirit by behaving in an ungodly way:
30 Don’t grieve the Holy Spirit of God, in whom you were sealed for the day of redemption. 31 Let all bitterness, wrath, anger, outcry, and slander be put away from you, with all malice.