It depends on the location and how expanded the endometriosis is. If it is a mild-to-moderate case of endometriosis, then pregnancy could be achieved with this technique.
On the contrary, in the most severe cases, it is likely that the Fallopian tubes are blocked due to this condition, in which case the sperm would not be able to meet the egg. Also, it might have affected the endometrial lining, reducing the embryo's possibilities of attaching to it.
Suggested for you: What Are the Success Rates of Intrauterine Insemination (IUI)?.