Skip to content

The given key was not present in the dictionary – Exchange migration CSV

Start a new migration batch on the on-premises Exchange Server or in Office 365. The steps are the same when creating a new migration batch. After choosing to upload the CSV file with the mailbox addresses, you get the error that the given key was not present in the dictionary. What is happening, and what is the solution to this error?

Information

You can use a CSV file to bulk migrate a large number of mailboxes. You can specify a CSV file when you use the Exchange admin center (EAC) or the New-MigrationBatch cmdlet in Exchange Management Shell to create a migration batch.

The given key was not present in the dictionary

We start a new migration batch in Exchange Server or Office 365. After clicking the browse button and selecting the CSV file, it should read it successfully and show how many mailboxes to migrate. This time we do get the error; The given key was not present in the dictionary.

The given key was not present in the dictionary Exchange migration CSV error

Why are we getting this error, and what is the solution for; the given key was not present in the dictionary?

Check new migration batch CSV header

Let’s go to the CSV file that we selected in the new migration batch. After opening the CSV file, we can see that the header is wrong, and that’s why it can’t be read. It’s showing the attribute EMAIL ADDRESS.

The given key was not present in the dictionary Exchange migration CSV wrong CSV file

Solution for the given key was not present in the dictionary

Migrating mailboxes with CSV files to Office 365 or another Exchange mailbox database requires the attribute EMAILADDRESS. When the attribute is not added correctly in the CSV header, it will not work, and the error shows up. Also, the SMTP address is not added to the users. The mailbox migration will eventually fail.

Edit CSV header for new migration batch

To correct the issue, edit the CSV header to EMAILADDRESS. Make sure that there is no space. Also, add the SMTP address to the users. In our example, the STMP address is @exoip.com. Save the CSV when finished.

The given key was not present in the dictionary Exchange migration CSV correct CSV file

Create a new migration batch and upload the CSV file. This time you don’t get the error; the given key was not present in the dictionary. Did this work for you?

Keep reading: Export mailbox folder permission to CSV file »

Conclusion

In this article, you learned about the error; the given key was not present in the dictionary. This error can show up when using CSV files for mailbox migration. Open the CSV file and look at the header. Edit the required attribute to EMAILADDRESS. Don’t forget that the accepted values are SMTP addresses and not display names. After editing, save the CSV file and start a new migration batch.

Did you enjoy this article? You may also like Enter product key in Exchange Server. Don’t forget to follow us and share this article.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *