Created
April 1, 2021 19:23
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Could be helpful for deploying Azure Machine Learning Compute Instances "on behalf of"