If you want to bulk create mail contacts in O365, the following powershell cmdlet will pull in a list of users from a CSV and create mail contacts from it:

 
Import-Csv .\MailContacts.csv|%{New-MailContact -Name $_.Name -DisplayName $_.Name -ExternalEmailAddress $_.ExternalEmailAddress -FirstName $_.FirstName -LastName $_.LastName}
 
Example of the CSV:
ExternalEmailAddress,Name,FirstName,LastName
Bob.Smith@Office365.com,Bob Smith,Bob,Smith