Endophytes are bacteria or fungi that live within plant tissue (between cells) and often generate benefits for the host plant, including greater stress resistance.  They also produce compounds of interest to human health, including anti-cancer agent taxol and anti-fungal agent cryptocin. Endophytes may grow throughout the entirety of a plant’s life cycle, but transmission occurs only through seeds.  Under certain circumstances (such as high nutrient demand), endophytes can become parasitic and cause disease in plants. 
The difficulty with endophytes is that they can be toxic to mammals and birds. A 1993 study estimated that endophytic fungi cause $600 million losses from livestock deaths per year.  A more recent report from Oregon State University noted loss estimates of $1 billion per year. Ergot alkaloids and indole diterpenes are among key disease-causing metabolites. Even when not lethal, endophytes can cause various kinds of diseases.
The presence of endophytes is also of concern with the cultivation of cannabis. Like many other plants, cannabis may become occupied. Numerous studies have indicated significant levels of diverse endophytes across cannabis varieties. [4, 5, 6] In general, cannabis benefits from endophytes; whether human consumers may suffer from infection is unclear but worth caution.
In the spirit of advancing understanding of endophytes, one group of researchers  outlined how to isolate and identify the organisms from plant tissue.
Visual inspection and collection of fungi on external areas of plants is the most basic solution. However, symptomless, healthy plants require one of three technique types:
Culturing refers to growing the bacteria or fungi in a petri dish, although this may “underestimate diversity and misrepresent the taxonomic composition of endophyte communities.” The authors profile dilution-to-extinction, a method that allows different species to grow slowly in relative isolation from one another. This spares cells that may be lost to competition in normal culturing.
DNA cloning is one example of a culture-independent method. The review highlights a polyermase chain reaction-based (PCR) method developed by Dombrowski et al . Rather than cloning DNA, PCR amplifies target DNA sequences, in this case “products from a conserved region of the Neotyphodium spp. tubulin 2 gene which is present in N. coenophialum [an endophyte species]…” 
Finally, there are several viable staining techniques to analyze endophytes.  During the reproduction period, endophytes grow into the embryonic axes of seeds. From there, the analyst can follow through with a grow-out test. This entails letting sample seeds develop for three weeks under greenhouse settings. Then, part of the infant plant leaf’s sheath is scraped using a scalpel blade. The authors continue, “leaf fragments are stained with aqueous aniline blue and then squashed with a cover slip. The prepared slide is then observed microscopically.” 
Image: Plant-pathogenic strain of Fusarium oxysporum—Keith Weller, USDA, Public Domain
- Kaur T. Fungal endophyte-host plant interactions: Role in sustainable agriculture. IntechOpen. 2020. 10.5772/intechopen.92367. [Impact Factor: n/a; Times Cited: 1 (ResearchGate)]
- Kogel K-H, Franken P, Hückelhoven R. Endophyte or parasite – what decides? Curr Opin Plant Biol. 2006;9(4):358-363. doi:https://doi.org/10.1016/j.pbi.2006.05.001. [Impact Factor: 8.356; Times Cited: 276 (Semantic Scholar)]
- Hoveland CS. Importance and economic significance of the Acremonium endophytes to performance of animals and grass plant. Agric Ecosyst Environ. 1993;44(1):3-12. doi:https://doi.org/10.1016/0167-8809(93)90036-O. [Impact Factor: 4.241; Times Cited: 331 (Semantic Scholar)]
- Maryanne S, et al. Endophytes of industrial hemp (Cannabis sativaL.) cultivars: Identification of culturable bacteria and fungi in leaves, petioles, and seeds. Canadian Journal of Microbiology. 64(10): 664-680. https://doi.org/10.1139/cjm-2018-0108. [Impact Factor: 1.793; Times Cited: 15 (Semantic Scholar)]
- Kusari P, Kusari S, Spiteller M, et al.Endophytic fungi harbored in Cannabis sativa L.: iversity and potential as biocontrol agents against host plant-specific phytopathogens. Fungal Diversity. 2013;60:137–151. https://doi.org/10.1007/s13225-012-0216-3. [Impact Factor: 15.386; Times Cited: 107 (Semantic Scholar)]
- Gautam AK, Kant M, Thakur Y. Isolation of endophytic fungi from Cannabis sativa and study their antifungal potential. Arch Phytopathol Plant Prot. 2013;46(6):627-635. doi:10.1080/03235408.2012.749696. [Impact Factor: n/a; Times Cited: 35 (Semantic Scholar)]
- Torres M, et al. Isolation and identification of fungal endophytes. In: Prospects and Applications for Plant Associated Microbes: A Laboratory Manual, Part B: Fungi. 2011:153-164. [Impact Factor: n/a; Times Cited: 4 (ResearchGate)]
- Dombrowski JE, Baldwin JC, Azevedo MD, Banowetz G. A sensitive PCR based assay to detect Neotyphodium fungi in seed plant tissue of tall fescue and ryegrass species. Crop Science. 2006;46:1064-1070. [Impact Factor: 1.878; Times Cited: 37 (Semantic Scholar)]