Catalyzes the first and rate limiting step of the catabolism of the essential amino acid tryptophan along the kynurenine pathway (PubMed:17671174). Involved in the peripheral immune tolerance, contributing to maintain homeostasis by preventing autoimmunity or immunopathology that would result from uncontrolled and overreacting immune responses (PubMed:25691885). Tryptophan shortage inhibits T lymphocytes division and accumulation of tryptophan catabolites induces T-cell apoptosis and differentiation of regulatory T-cells (PubMed:25691885). Acts as a suppressor of anti-tumor immunity (PubMed:14502282, PubMed:23103127, PubMed:25157255, PubMed:25691885). Limits the growth of intracellular pathogens by depriving tryptophan (PubMed:25691885). Protects the fetus from maternal immune rejection (PubMed:25691885).