How to download all attachments in MS CRM – MS CRM Attachment downloader

8Aprile 2021 Note: This tool is nomore supported and i have developed an alternative Xrmtoolbox plusgin which can be used for same purpose:

Recently faced a requirement where crm user wanted to download attachments of certain records from a crm instance.

I thought why not build an application to do the same.

You can download the MSCRMAttachmentDownloader  solution and start making changes according to your need.

I have also created a MSCRMAttachmentsDownloaderInstaller  setup which can be installed on system and you can start using it.

Code is available for the project on github on links mentioned above.

Note:- Application is compatible with on-premise Dynamics crm 2016 or below version as of now.

Let’s test it:-

I have already installed it, you can download it from MSCRMAttachmentsDownloaderInstaller and install:-

Installation Steps:-

Step 1:-

Go to MSCRMAttachmentsDownloaderInstaller  and click download zip as follow:


Step 2:-

Unzip the downloaded file, and navigate to debug folder.

In debug, click on setup.exe file and install the application


Follow the simple installation process. The application will get installed.

Downloading Steps:-
Step 1:-

Run the application “CRM Attachment Downloader” from desktop and provide necessary details as shown below:-

Logging into application

Step 2:-

Once connected, application will take you to the next page as shown below:-

After login

Step 3:-

Click browse and select a location where you want to download the attachments:-

Select download location

Step 4:-

Get the fetch xml of records for which you want to download attachments.

For example cases created on today:-

get fetch xml query

On clicking download, an xml file will get downloaded, open the file in notepad and copy the fetch xml.

Step 5:-

Replace the default fetch xml with in fetch xml box of CRM Attachment Downloaded  application with copied xml:-


Step 6:-

Click the download button. The attachments from all the record of fetch xml result will get downloaded into your selected download location folder:-


Step 7:-

Click view to see downloaded files:-


Hope the application will be useful.

Waiting for your feedback. Also if anyone can contribute to the project, can contact me on

Happy CRM…!!!

12 thoughts on “How to download all attachments in MS CRM – MS CRM Attachment downloader

Add yours

  1. Hi Vishal- this looks great and this is exactly our use case. We use crm online Microsoft Dynamics 365
    Version 1612 ( (DB However it is unclear what both the organization URL and the domain should be to authenticate. The organization service URL I get from Developer Settings in our application is https://<&gt; (removed the org). We use office 365 authentication. What would domain be?


    1. Hey Matt
      Actually this application is for on-premise crm. If you want, i can help you in changing it to make it work for online D365 crm. You can ping me on skype (username : vishalgrade)


    1. I’m not sure if this tool will get connected to crm 4.0 but I have posted link to the solution itself where you can make changes if tool doesn’t connect to crm 4.0 let me know if if work


  2. I’m looking to download excel files from D365. Is there a possibility with this downloader? Also, how about scheduling? Thank you!


    1. Hi Shree, This tool works for onpremise version and download all attachment including excel. You can get code from guithub and change that according to your requirement and schedule the console app/webjob.


    1. Hi Vitors_14, This tool is not maintained now, instead you can use another tool developed by me which is a XRMToolBox Plugin named
      “Attachment Downloader”. It takes fetch xml of related table, for eg: if you want to download notes from a specific account, provide account’s fetch xml as input and it’ll download all notes related to that account. Xrmtoolbox Reference: Attachment Downloader Reference:

      Please follow to use new tool :

      Liked by 1 person

      1. Thank you, it will be of great help, I have had many problems with the connection to the XRMToolbox and the SDK, I will solve it and test your plugin, thanks again, I will tell you if I achieve the connection. Greetings


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at

Up ↑

%d bloggers like this: