Enable Azure Storage
Azure Storage integration for portals enables you to take advantage of the greater file storage capability of Azure, using the same interface and providing the same user experience as for default file attachments. This feature is supported for web files, entity forms, and web forms.
You must create a storage account with Resource manager as the deployment model. More information: Create an Azure storage account.
After the storage account is running, portals require certain global settings that tell the application how to locate your storage account. From Dynamics 365 for Customer Engagement, go to Settings > Settings, and add a new setting named FileStorage/CloudStorageAccount.
The maximum file upload size is 125 MB.
To locate the value for FileStorage/CloudStorageAccount, you must get a connection string from your Azure portal.
Sign in to your Azure portal.
Navigate to your storage account.
Select Access Keys.
In the resulting panel, locate the field labeled Connection String. Select the Copy icon next to the field for which you need to copy the value, and then paste that value into your new setting:
Specify the storage container
If you do not already have an Azure Blob container in your storage account, you must add one by using your Azure portal.
From Dynamics 365 for Customer Engagement, go to Settings > Settings, and add a new setting named FileStorage/CloudStorageContainerName, using the name of your container as the value.
Add CORS rule
You must add cross-origin resource sharing (CORS) rule on your Azure Storage account as follows, otherwise you will see the regular attachment icon rather than the cloud icon:
- Allowed origins: Specify your Dynamics 365 for Customer Engagement domain. For example, contoso.crm.dynamics.com.
- Allowed verbs: GET, PUT, DELETE, HEAD, POST
- Allowed headers: Specify the request headers that the origin domain may specify on the CORS request. For example, x-ms-meta-data*, x-ms-meta-target*.
- Exposed headers: Specify the response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer. For example, x-ms-meta-*.
- Maximum age (seconds): Specify the maximum amount time that a browser should cache the preflight OPTIONS request. For example, 200.
More information: CORS support for the Azure Storage Services
Add site settings
Add the following site settings from Portals > Site Settings. More information: Manage portal site settings.
|WebFiles/CloudStorageAccount||Provide the same connection string as provided for the FileStorage/CloudStorageAccount setting.|
You can now create a child file in portal and mention fully qualified name (along with container) in Azure Blob address URL. With these settings, your portal capabilities for Dynamics 365 for Customer Engagement application is ready to begin uploading and downloading files to and from Azure Storage. However, you cannot take full advantage of this feature until you add a web resource to enable uploading attachments to Azure Storage, and configure entity forms or web forms to use it.