Yes, ‘satan’ was in the heavenly court. No, he was never ‘invited’. It’s simply the wrong word.
Yes, ‘satan’ was granted power over Job’s health, family, and goods. The power was always limited by God Himself. This is right in the text of Job 1 and 2:
“The Lord said to Satan, “Very well, then...