The British never tried to invade Morocco because the plot Germany had to instigate aggression in Morocco in order to place a wedge between Britain and France and it actually had the opposite effect. It all happened when Kaiser Wilhelm of Germany went to Tangiers to give his support for the Morocco sultan which made France and Britain angry.
It was called the First Moroccan Crisis, a foreshadowing and was significant because it was a foreshadowing of sorts to the conflict to come between Europe’s major nations in what would eventually be the First World War. But Britain and France saw the manipulation and bonded together, for that time at least.