A pen needle assembly (10) includes a pen needle hub body (16) having a needleshield (28) that covers a needle (26) and can be retracted to expose theneedle duringinjection and return to the extended position after use and locked in theextended position.A spring (56) is provided to rotate the needle shield after use to a lockedposition. Alocking member (84) can be provided on the needle shield that cooperates withthe hubbody (16) to prevent rotation after use. An attachment mechanism (38) for thepen needleprovides a sensory indication when a needle-bearing hub body (16) is seated ona pen andlimits further rotation of the pen needle relative to the delivery device.