How to get azure portal login name in Azure data factory pipeline stored procedure activity

HemantSudehely-0557 266 Reputation points
2023-05-11T22:33:22.7566667+00:00

Hi,

I need assistance. I am using Azure Data Factory activity for data migration from source to destination. Next, we also need to log the user running these Azure Data Factory pipelines, such as the get portal.azure.com login from azure function, and pass output of azure function to the Azure Data Factory pipeline stored procedure activity and log in to the target database.

At the workflow activity level, I don't see the option to get the portal login username or email id. So I decided to use an Azure function to get the portal username, pass it to the Pipelines activity, and log it to the target log table. But below azure function code return nothing as output.

Can you please suggest if there is anything i am missing in below code to get user or is there any other way to get user information in pipelines activities?
adf

Azure Function

Thanks

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,639 questions
{count} votes

Accepted answer
  1. Nandan Hegde 36,151 Reputation points MVP Volunteer Moderator
    2023-05-18T13:39:33.56+00:00

    0

    You can use the Activity Logs REST API : Activity Logs – List to get the User ID details.

    MSFT docs : https://learn.microsoft.com/en-us/rest/api/monitor/activity-logs/list?tabs=HTTP

    You can use web activity to trigger the REST API

    refer the below blog for additional details:

    https://datasharkx.wordpress.com/2023/05/18/automated-way-to-get-the-id-of-user-manually-triggering-the-azure-data-factory-pipeline/


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.