A court heard the victim was screaming and in severe pain as the dog bit his arms and legs during the incident.
Matthew Byford encouraged his pet dog, called Tyson, to cause injuries to the man at the property in Wakefield city centre.
Leeds Crown Court heard Byford and another man went to the flat where the victim lived on Cheapside on August 28 last year.
Most Popular
-
1
How to see Lancaster bomber and Spitfire flypasts near Leeds at Yorkshire Wartime Village
-
2
Major new £85m build-to-rent Leeds city centre development to go ahead following approval
-
3
Developers admit planning breaches in construction of Leeds retirement flats
-
4
Leeds councillor in plea for public help after reporting suspected drug house to police
-
5
Leeds train strikes: Northern issues 'do not travel' warning to passengers as operator confirms skeleton schedule
Byford's friend knew the victim and was allowed in to have a drink with him.
The friend left the communal front door wide open and Byford went into the property with the animal.
Byford and his friend then encouraged the dog to bite the man.
People from a nearby taxi office heard the man's screams and went to the flat.
They banged on the door and Byford and the other man left with the dog.
Byford, 31, of Peterson Road, Wakefield, pleaded guilty to inflicting grievous bodily harm and being in charge of a dangerously out of control dog.
The court heard Byford pleaded guilty to the charges at an early stage and was suffering from mental health issues at the time.
He was given a 21-month sentence, suspended for two years.
Byford was also made the subject of a 12-month mental health requirement and ordered to complete 25 rehabilitation activity requirement days.
Judge Penelope Belcher said: "The dog was in effect used as a weapon."