Maybe you are referring to an idea that I saw quoted by Chabad (3rd question here) in the name of the Chida in the name of the Arizal
When Moshe went up to heaven to take the Torah, the angels opposed him (see Gemara Shabbat 88b). After he succeeded in proving that the Torah is meant for man and not for angels, they still insisted that the esoteric teachings of the Torah (penimiut haTorah) remain with them. The one who revealed the esoteric teachings of Torah was Rabbi Shimon bar Yochai.
See also end of first point here.