(Numbers 22:12:) "And God said to Balaam: You shall not go with them." He said to Him: If so, I will curse them from my place. (Ibid.:) "You shall not curse the people." He said to Him: Let me bless them. He said to him: They have no need of your blessing, (ibid.:) "for it is blessed." A parable: They say to the hornet, "Neither from your honey nor from your sting."
Balaam Barred from Cursing or Blessing Israel by God
Midrash Tanchuma Buber, Balak 9:1
ויאמר אלהים אל בלעם לא תלך עמהם (שם שם יב). א"ל א"כ אקללם במקומי, לא תאר את העם (שם), א"ל אברכם, א"ל אין צריכין לברכתך, כי ברוך הוא (שם), משל אמרי ליה לצרעה, לא מן דובשך ולא מן עוקצך.