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
There will be running task. You could click on that and you able to see a file stdout.txt
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 or upvote 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