I recently wrote a couple of blogs regarding the Microsoft Dynamics 365 Attachment Management solution that highlighted the benefits of using Azure Blob storage to hold attachments. I also uncovered an issue when using the Attachment Management solution with Dynamics 365 Portals.
The team at Microsoft Labs did not let this go unnoticed and created an updated version of the Attachment Management solution that not only addresses the Portal issue but also added a couple of other features to the solution.
Essentially, Microsoft sent me the following note just days after my original blog post:
Setting Up the Solution
For the rest of this post, I will assume that this might be your first time setting up the Attachment Management solution so I will start from the beginning. If you have already set up the solution, you will need to first update it and then go here to see what you need to do to make it Portal friendly.
The first thing you will need to do is set up an Azure Storage account in Azure. As I had mentioned in the past, Azure provides a lot of extras and features to your Dynamics 365 system so it should almost be default that you deploy Azure with Dynamics 365.
In Azure, highlight Storage Accounts and then choose “+Add”. Give the storage account a name and provide relevant details for the type of implementation. I would strongly suggest enabling secure transfer and try to ensure that your resource group location is in the same data center as your Dynamics 365 instance.
You will need to configure 2 containers, one for notes and for email attachments. Once the storage account is created, click on “+Container” to add a new container.
Give the container a name that reflects what it stores. Also set the access to Private.
Create a container for notes as well.
You will also need to generate a Shared Access Signature so Dynamics 365 will know where to store and retrieve the files. In the Storage Account blade, click on “Shared Access Signature”
With the Shared Access Signature, you can specify the time range for access to the attachments. Make sure that the start date is a few days in the past and your end date is far enough in the future. If you set it in the next few months or years, maybe setting a reminder in your Outlook will be a good idea so your users won’t start getting errors.
Once the SAS token is created, keep the window open or copy the SAS as you will need it in the next few steps. In the event you do close the window, you will need to generate a new SAS token.
Installing on Dynamics 365
Navigate to your Dynamics 365 system to install the Attachment Manager solution. Navigate to Settings and then go to the Dynamics Marketplace. You will need system customer rights to install the solution.
Locate the “Attachment Management” solution.
The solution will need your account information in order to install the solution.
You will see the information regarding the solution and you will need to designate which organization you want to install the solution to.
Once you have agreed, the solution will begin to be installed. You can monitor the installation in the Dynamics 365 Administration Center in Office 365.
After 5 to 10 minutes, the solution should be installed. In Dynamics 365 navigate to Azure Attachment Storage. If you don’t see the area, log out and log back in to refresh the sitemap.
Click on Azure Blob Storage Settings to enter in the Azure settings. Key in the storage account name, the SAS token and the names of the notes and email attachment containers. Click Confirm to save the information.
Be sure to update the security roles so end users will be able to attach files without getting an error message:
The Portal Fix
The original version (1.1) that was all you needed to do. The updated version (1.5) there is now an extra, important configuration step. Click on Notes Attachment Entities.
Choose the entities for which you want note attachments to move to Azure storage. If you plan on using the Dynamics 365 Portal, then UNCHECK THE adx_webfile ENTITY! Miss this step and your Portal could turn into a real mess!
This was due to the fact that the Dynamics 365 Portal uses file attachments to store images and CSS files. If these move to Azure, the portal cannot read the attachment and will not apply the files to the Portal.
If there are entities for which you would rather not move into Azure storage, uncheck those as well.
Now when you attach a file to a Dynamics 365 record (that is set to have attachments move to Azure) you should see in the Azure Storage Account the attachments appearing.
The previous version would only work on a “go forward” basis meaning that if you have attachments already in Dynamics 365 these would not be moved to Azure. Navigate the to Azure Attachment Area and choose “Reports and Admin”.
You now will be able to see how many attachments have moved over and you also can select and move existing attachments (assuming the entities are selected) to Azure Blob storage. This is a great feature for existing Dynamics 365 installations that may have a lot of existing attachments.
At this point I haven’t tested a large amount of records, so I would be hesitant to run this against a 200GB database.
Storing attachments in Azure is one way to keep your Dynamics 365 database to a reasonable size. With the latest improvements and fixes, the Attachment Management and the Dynamics 365 Portal can co-exist.
The solution also comes with web resources to allow users to drag and drop attachments and an interface to download multiple attachments. I will review these in an upcoming blog post.
Thanks to Suresh Guduru and the Microsoft Labs team for the quick response and release of this latest version of the Attachment Manager.
Nick Doelman is a Microsoft Business Solutions MVP and will be participating in the CRMUG/D365UG Summit in Nashville from October 9th-13th and will be presenting at Extreme365 in Long Beach, California November 6th-9th. If you are attending either of these events, please come say hi!