Obito tried to cast it using the Divine Tree's bud and Ten Tail's power.
Madara did it by absorbing the Divine Tree and using the Rinne Sharingan.
Kaguya did it just by eating the Divine Tree's chakra fruit (which I believe only contains a fraction of Ten Tail's/Divine Tree's power).
So what is the working behind casting the Infinite Tsukuyomi?