You asked

Which 50mm lens with autofocus works on a leica m body?

The guide has no autofocus lens for the Leica M mount. Leica M bodies are manual-focus cameras, and every Leica M lens in the catalogue is manual focus, so no autofocus 50mm is listed. The guide can't name one.

Three 50mm lenses fit a Leica M body:

For a Leica M, the guide would pick the Summicron-M 50mm f/2 as the everyday lens. It gives up the speed of the Noctilux and the compactness of the Elmar, but it is sharp and fits most uses. Focus by eye, and check the framing in the viewfinder.

Written by Claude from this site's pages.

The answer changes if

Ask next

From these pages

This answer is for the question above. Each answer is written for the exact question in its address, so a question with its details in it (a budget, what you shoot, what you already have) gets an answer about those details. An answer draws on all 15 pages of the guide and its catalogue of 320 cameras and 1050 lenses. Another question gets its own answer at its own address, as words after /ask/. Or fill in your own: /ask/which-camera-for-{what-you-shoot}-under-{budget}-euros or /ask/which-lens-for-{what-you-shoot}-on-{your-camera}.