I was wanting to import a CSV file of contacts into the contacts folder of a Shared Mailbox and using OWA (Outlook Web App) to do so. Normally one goes to wheel->Import-Contacts, supply the file name, and success…
In OWA it’s possible to open a Shared Mailbox if you have the rights to do so (use the menu with your name and select “Open another mailbox…”). However if you try this it fails with a 403 error. Shame.
Of course PowerShell comes to the rescue. Office 365 has a cmdlet Import-ContactList (help). Connect PowerShell to Office 365 in the normal way and call that cmdlet specifying the user to import to and the CSV and it does the job.
VERBOSE: Importing contacts to mailbox “firstname.lastname@example.org”.RunspaceId : bdf8902b-e858-44ba-a8ee-368fc809f6c2
ContactsImported : 136
Identity : tmp-contact-import1
IsValid : True
ObjectState : New
The Contact folder for the Shared Mailbox is now full: