Police were called out to flats in Stockland Green after Lemech Baldeo threw plant pots at the building and got inside at around 10pm on April 28 this year.
The 35-year-old then pushed open the front door of a woman's flat as she tried to lock it, shoved her inside and demanded cash.
He punched her face, bit her and began pulling at her clothing. Thankfully the woman managed to get free and minutes later officers arrived after they were called by worried neighbours.
The two female officers arrested and handcuffed Baldeo but as they led him from the flat he became abusive, kicked out and grabbed one officer between her legs.
He was subdued by officers but as he was transported to custody he also racially abused them and headbutted one, splitting her lip.
At Birmingham Crown Court on Monday Baldeo, of Rookery Road, Handsworth, Birmingham, was jailed for a total of nine years after pleading guilty to robbery, sexual assault, criminal damage, assault on emergency worker and racially-aggravated assault.
On release, he will remain on the sexual offenders register for 10 years.
DC Victoria Livingstone, from Force CID, said: "This was a horrible series of crimes committed by a dangerous man who is now behind bars for a significant period of time.
"There was a sexual element running through all this which has not only resulted in a jail term but Baldeo will also be monitored on the sex offenders register after he is released.
"We have also been able to offer support to the victim and to our officers, who are now being able to move on from this harrowing experience."
A spokesperson for the force added: "If you've been affected by this, please take a look at our website at west-midlands.police.uk/your-options/sexual-assault.
"We work with a range of support groups who can offer advice including The Survivors Trust, which is there to help survivors of sex crimes and their loved ones - they're on 08088 010818."