From within an AzureML pipeline (SDK v2), you can read the run_id from an environment variable and then get the display name as follows
client = MLClient( ... ) job = client.jobs.get(os.environ["AZUREML_RUN_ID"]) job.display_name