I am DMing the Out of the Abyss campaign.
According to p. 21 of the adventure book, various events in the adventure or certain conditions being met will call for a saving throw against demonic madness to be made. It directs the DM to the "Madness" section in Chapter 8 of the DMG (p. 258-260). In short: the characters roll a Wisdom save if they encounter a certain type of monster, which spreads madness; if they fail the save, they gain a level of madness and the corresponding effect.
My group has a shield guardian (Monster Manual, p. 271) as a companion that they won in a past game (no class feature). Shield guardians are immune to the charmed and frightened conditions, among others (exhaustion, paralyzed, poisoned).
Would the shield guardian be affected by the madness spread by the demons? Or would it be unaffected, thanks to its many mind-affecting immunities?