The script below works fine for adding users to a enterprise application with azure, but I have not been able to figure out how to use this with a CSV list of users, any help appreciated.
The simplest approach is to know Import-CSV and Foreach-Object cmdlet.
You can import the csv and iterate through the rows one at a time using Foreach-Object or foreach. Below links will help you to start.
I made the changes below, it is reading the users from CSV file, but now it is erroring when adding to the application, this works fine if I specify a user, not sure what the difference could be now, error below, if i look at $user it is correct all info there