Skip to content

Instantly share code, notes, and snippets.

@ezwiefel
Created April 1, 2021 19:23
Show Gist options
  • Save ezwiefel/e37defcef8e987268d4b19ec0e809c97 to your computer and use it in GitHub Desktop.
Save ezwiefel/e37defcef8e987268d4b19ec0e809c97 to your computer and use it in GitHub Desktop.
Get a list of AD Object IDs for a text file with email addresses
filename="attendee-emails.txt"
lines=$(cat $FILENAME)
for user in $lines
do
az ad user show --id $user --query objectId -o tsv >> user_ids.txt
done
@ezwiefel
Copy link
Author

ezwiefel commented Apr 1, 2021

Could be helpful for deploying Azure Machine Learning Compute Instances "on behalf of"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment