An ex-Microsoft worker has accused the US software giant of bungling her internal complaint that a fellow employee raped her while she slept.

In a letter submitted in support of an ongoing gender discrimination class-action lawsuit against Microsoft in the US state of Washington, the woman said that, in 2012, she was working for Microsoft as an intern when, after a night out in Seattle, one of her coworkers seriously sexually assaulted her without her consent while she was sleeping.

At the end of the evening, the woman had passed out in the basement of a shared home where her colleague was staying, and woke, naked, with flashbacks of being “forcibly penetrated" by her coworker, according to the letter.

The former intern said she went to the hospital, and reported him to the police. She also alerted Microsoft HR, but was told she would have to continue working with her alleged assailant, who was also a Microsoft intern. Both the woman and her alleged attacker would later go on to become full-time Microsoft employees.

In her letter, revealed to the court, the woman said Microsoft bosses told her that if she obtained and wanted to enforce a restraining order against her alleged rapist, she would have to change departments, something the woman was not willing to do. The tech giant did, however, move the man's desk away from hers.

WOMEN, your 'SUPERPOWER' is ... NOT asking for a RAISE: Satya Nadella READ MORE

The settlement letter, written in 2014, was offered by the class-action lawsuit's lawyers as evidence of Microsoft's unwillingness to address harassment and assault dangers faced by its women employees, all part of much wider allegations of gender discrimination plaguing the Windows giant.

"Company records indicate that women at Microsoft are sexualized by their male managers and coworkers, leading to a substantial number of incidents of alleged sexual harassment, and even several incidents of sexual assault, that often go unpunished," an unsealed copy of the complaint [PDF] reads.

"Such incidents were often tied to Microsoft work trainings, or work social events, which should have been important professional networking and development opportunities, but instead were threatening environments for many Microsoft women."

In a statement, Microsoft told The Register with the following statement:

We work hard to create a safe work environment for every employee. The incident referenced took place away from work, but we took the allegation very seriously. Our global security team and our employee relations investigations team met with the employee to review the allegation. We encouraged her to take her complaint to law enforcement, and offered to connect her with additional resources such as victim advocacy groups. We also took practical steps to address concerns she had about her safety. Law enforcement did not ultimately file any charges. Given this, and our own findings, we took the action we deemed appropriate related to the accused employee. We continued to work with the employee who raised the complaint to provide support.”

The discrimination class-action suit was brought by Katie Moussouris, a veteran of the infosec world who, among many things, launched Microsoft's and the US Department of Defense's first bug bounty programs. ®