What modes can use SET_ATTITUDE_TARGET

I was just wondering what modes supported the use of SET_ATTITUDE_TARGET. I recently tried using it in GUIDED_NOGPS mode and it worked but the problem is that the drone did not hold its position when taking off. It took off, drifted for a bit, and then performed the command. So I was wondering if SET_ATTITUDE_TARGET was supported in modes like GUIDED or POS_HOLD