The short answer
The Buddha is not recorded as teaching about LGBT identity in the modern sense. The early texts do not use those categories, so there is no direct statement of acceptance or rejection. What exists is a set of ethical precepts, monastic rules and later commentary, and Buddhists today read them in different ways.
What the early texts say, and don’t say
The Buddhist lay precept on sexual conduct asks followers to avoid “sexual misconduct.” In the early texts the focus is on harm, such as adultery, coercion or relations with someone under another person’s protection. The wording does not clearly single out same-sex relationships. Later commentaries and traditions added more specific interpretations, and these vary by region and school.
The monastic code, or Vinaya, contains rules about who may be ordained. It mentions a category called pandaka, which is often discussed in connection with people who did not fit conventional male or female categories. Scholars disagree about exactly whom the term covered and how the rules were applied, so it is risky to equate it with any modern identity.
Monastic celibacy applies to everyone
Monks and nuns are expected to be celibate whatever their orientation, and this applies to heterosexual and same-sex relations alike. Much of the traditional discussion of sexuality in the Vinaya is about monastic discipline, not about the moral standing of lay people.
How Buddhist traditions differ today
There is no single Buddhist authority that speaks for all Buddhists. Some teachers and communities, particularly in Western countries and in parts of East Asia, welcome LGBT practitioners and support equal treatment. Other traditions and teachers hold more restrictive readings of the sexual conduct precept, drawing on commentarial material. Public statements by prominent Tibetan teachers, including the Dalai Lama, have at times combined traditional readings of particular acts with calls for compassion and against violence or discrimination, and people interpret these in different ways.
If you want a wider picture, our articles on how Buddhism views LGBT people and whether LGBTQ is allowed in Buddhism look at the question across traditions.
Compassion and non-harm as a common thread
Across traditions, Buddhist ethics gives weight to compassion, non-harm and awareness of one’s own conduct. Many Buddhists argue that these principles call for respect toward everyone. Others emphasize that the tradition has specific rules whatever the principle. Both views exist within Buddhism.
Reading the sources carefully
When people say “the Buddha accepts” or “the Buddha forbids” something about LGBT people, they are usually applying a modern question to ancient texts. A cautious reader can say that the earliest sources do not address it directly, that later traditions differ, and that practice today ranges from welcoming to restrictive. For specific guidance, speaking with a teacher in the tradition you are interested in is more reliable than any general answer.