Connect-AzAccount -UseDeviceAuthentication in Azure Data Factory using Custom Activity

Sameer Bhat 126 Reputation points Microsoft Employee
2021-10-19T15:26:47.86+00:00

Hi,

I'm trying to run Connect-AzAccount -UseDeviceAuthentication in Azure Data Factory using Custom Activity. However, I'm not getting any URL for device authentication.(https://microsoft.com/devicelogin) which should ask for the code.

Can someone let me know where to get that cmdlet that asks to login into URL and enter the code for login using data factory.

Thanks

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,529 questions
0 comments No comments
{count} votes

Accepted answer
  1. svijay-MSFT 5,201 Reputation points Microsoft Employee
    2021-10-21T14:44:06.623+00:00

    Hello @Sameer Bhat ,

    Thanks for the question and using MS Q&A platform.

    I believe you are using Connect-AzAccount -useDeviceAuthentication and you would like obtain the code.

    You can get from accessing the Job's Output.

    Batch service --> Select Jobs

    142493-image.png

    There will be running task. You could click on that and you able to see a file stdout.txt

    142454-image.png

    142523-image.png

    This fille will have all the text that are displayed in the output stream of the node the task is running.

    Additional Note :

    These are the files that are produced/saved in the node. Only after the task has completed - the above files are copied to the storage account associated.

    If you are looking to programmatically fetch the file, you could make use of the below api.

    https://learn.microsoft.com/en-us/rest/api/batchservice/file/get-from-task

    I'd recommend you to make use of service principal for authentication if applicable (or any authentication that will not need any user intervention) - as this would automate the process completely.

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful