There are a few possibilities, but the most likely is that your microphone does not produce enough signal to be "heard" through the Mac line input. Usually this is normal, with most microphones producing perhaps 1/100th of the signal needed, which would be called "mic level".
You cassette deck probably outputs "line level", much stronger and strong enough to register in the Mac Line input. Similarly, the cassette deck microphone input is probably "mic level" and much more sensitive than the Mac line input.
There are other possibilities, such as a powered microphone, but you have not provided any model numbers or specifications to analyze.
Try this: plug in the microphone like you did before, and make a really loud sound right in front of the mike, like clapping hands. You may see or hear a faint sound register on the Mac.
The usual cure is to buy a microphone preamplifer. You can also buy a new microphone with a built-in preamplifier. You can also buy a USB microphone or preamplifier device that bypasses the analog Line input entirely.
Often you can at least see a little signal if the Mac input level is turned all the way up and a loud clap is made, so I don't know your exact problem, but in any event, it was not designed to work anyway. Another little problem is that the microphone is likely a single channel unit, and the Mac Line-In is a stereo input.
Everyone's informative responses made a light-bulb go on and the problem is solved without any additional expense.
I plugged the new mic into my handheld cassette-recorder's mic socket, and connected its earphone socket to the laptop's input socket via a two-pin cable. I set SystemPreferences->Sound->Input to 'Line In' and pushed the record button on the cassette-recorder and paused it and kept it quite far away. I saw SystemPreferences->Sound->Input's sensor/detector picking up a big signal and started Audacity to record. I simply breathed onto the mic's pickup and rubbed it to ensure that the cassette-recorder's mic would not pick up any sound. Sure enough, the breathing and rubbing registered and were recorded exactly as one would expect.
If the system will let me mark my own reply as 'Solved' I'll do so with the intention being that others with the same problem can easily locate this cheap and easy workaround.