If you dream that someone has sexually assaulted or harassed you, that person may represent someone who is dominating you in waking life. You may be afraid of being humiliated if you do what they want.
If the person in the dream is someone you know in waking life, the dream might be a warning that this person is a threat to you.
If you have been a victim of a sexual assault or of sexual harassment in waking life, and the assault or harassment has been recreated in your dream, you still haven’t come to terms with what happened to you and might need to seek professional assistance.