Are there any instances of a medium small armed gang (<100 men) entering and taking over a medieval city (in any part of the world)? How well did medieval city defenses work against medium-small groups of armed robbers?
It seems like this would be a more common threat than an army laying siege to a city.
Let me see if I can be more specific. I am aware that pre-gunpowder cities around the world often had walls. It makes sense that you could hide behind walls if an army showed up. But cities had to be open for business: people have to come and go from a city. A lesser force (which I call a gang in the OP) might catch the gate guard by surprise, or walk in one at a time. Or 2-3 confederates in the city might catch the gate guard at night and open it.
That all sounds fine. I wonder if it has ever happened. I see mention of incidents in the comments about gullible bishops etc.
A good answer would recount 1 or more incidents (with links if you do not want to go into detail in the answer) and then deduce a trend or pattern for such things. Or, if it is nearly impossible for such a thing to have happened, lay out why.