Three men armed with a baseball bat, a knife and pepper spray managed to gain entry to a secure block of flats on Kennion Road, Harrogate on Monday.
The men tried to force their way into one of the properties at around 11pm on March 16, but the occupants prevented them from gaining access to their flat.
North Yorkshire Police confirmed that the occupants were uninjured following the incident, apart from the effects of pepper spray.
The three men are all described as black, approximately 5ft 9-10in tall, of slim build and were wearing dark-coloured clothing including hooded tops.
Police are carrying out extensive enquiries to locate the men and as part of the investigation, are appealing to anyone with any information to come forward.
Officers believe that the attack was targeted and that the wider community were not at risk.
The incident is the second attack of note to take place in Harrogate this week after four men threatened staff at Montpellier Antiques in a terrifying armed raid on Monday morning.
The robbers burst into Montpellier Antiques, armed with a machete and an axe, at around 11.40am before making off with high value jewellery.
Anyone who can help officers with their enquiries is urged to contact North Yorkshire Police on 101 - select option 2 - and ask for PC 176 Wilson. Alternatively, information can be emailed to Graham.Wilson@northyorkshire.pnn.police.uk
If you prefer not to give your name, Crimestoppers can be contacted anonymously on 0800 555 111.
Please quote reference number 12150043342 when passing information about this incident.