401: Unauthorized error in CRM Data Import Tool

[In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/pabloperalta] 

Hi, just a piece of advice..

First of all, if you do not use this Dynamics CRM Data Import / Export tool, you should do. It is really an extremely useful tool to update data inline as well as export it and quickly import in another environment and/or with additional data.

Second, if you are trying to use it and face the "The request failed with HTTP status 401: Unauthorized."  error, try the following (which worked for me):

 In the source code, do uncomment the following lines in the method CreateServiceObj within ExpHelper class:

crmMetadataService.UseDefaultCredentials = true;

_CrmService.UseDefaultCredentials = true;

After this adjustment, just recompile and enjoy the tool.

As a suggestion, if you typically work against the same CRM installation, to avoid typing every time the sign-in info, just edit form2 and pre-populate the fields with the corresponding sign-in data. Maybe you would like to leave the password field empty, but it anyway it will be much more productive than filling all data each time.

Hope it helps,

PP

[In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/pabloperalta]

No Comments