Praise be to Allah the Lord of the Worlds.
According to Al-Sha`rani, Tasawwuf is applying the learnt rulings of Sharia. Based on this definition, Tasawwuf is obligatory since applying these rulings is obligatory. In addition, all other definitions of Tasawwuf boil down to worshipping Allah as if one sees Him. Therefore, whoever views Tasawwuf outside this frame violates Sharia. And Allah The Almighty Knows Best.