According to Roman Catholicism, are humans the only beings that can be tempted? If Jesus got tempted for 40 days does it mean Satan can tempt God? Are humans the only ones that are tempted because of flesh or even in spirit there is still temptation, or are angels and saints also tempted? My understanding is that Satan and his associates were once good angels before going against God.

I'd like this answered according to Roman Catholic doctrine, please.
The saints are in heaven, and presumably immune from temptation. They &quot;are in glory, contemplating 'in full light, God himself, triune and one, exactly as he is.'&quot; (CCC954)
The angels &quot;are personal and immortal creatures, surpassing in perfection all visible creatures, as the splendour of their glory bears witness.&quot; (CCC 330)
Thus neither saints nor angels can be tempted. That does not mean that they do not have free will; merely that they are protected from temptation by their perfection in heaven.
Lucifer is the agent of temptation. &quot;The Devil and the other demons were indeed created naturally good by God, but they became evil by their own doing&quot; (Lateran Council, 1215; CCC391).

Scripture (2 Pet 2:4) speaks of the sin of these angels. This &quot;fall&quot; consists in the free choice of these created spirits, who radically and irrevocably rejected God and his reign.
(CCC392)

Temptation is the luring away from the will of God, and sin its rejection (that is, accepting the lure) by the exercise of free will contrary to his ordinances. Only creatures with free will can be tempted. The Catechism shies away from explicitly saying that animals do not have free will, although it certainly implies that (CCC1730–1738), and it is likely that animals cannot reject what is right; they simply do as they will, even though they might seem remorseful afterwards.
With regard to Satan tempting God in Christ, don't forget that Jesus was fully man (as well as fully God). As a man, he had free will. However, he doesn't reject God's will, because that would be to deny himself as God. Satan's attempt was entirely forlorn — doomed from the outset — but by being obedient to the divine will, Jesus offers us something to emulate.

Jesus is the new Adam who remained faithful just where the first Adam had given in to temptation. Jesus fulfils Israel's vocation perfectly: in contrast to those who had once provoked God during forty years in the desert, Christ reveals himself as God's Servant, totally obedient to the divine will. In this, Jesus is the devil's conqueror: he &quot;binds the strong man&quot; to take back his plunder. Jesus' victory over the tempter in the desert anticipates victory at the Passion, the supreme act of obedience of his filial love for the Father.
Jesus' temptation reveals the way in which the Son of God is Messiah, contrary to the way Satan proposes to him and the way men wish to attribute to him.
(CCC539–540)

So, yes: by a process of elimination, human beings are the only beings who can be tempted.