How to integrate Azure Blob storage with CloudFiles
Here's a step-by-step guide to help you connect your Azure blob storage container with CloudFiles.
Authorize CloudFiles
Begin by authorizing the CloudFiles application. This can be done by clicking on the button below. This action will add CloudFiles to the enterprise applications list on your Azure portal.
- Navigate to Azure Portal - Log in to your Azure portal.
- Create a New Storage Account - Go to the 'Storage accounts' section and click on 'Add' to create a new storage account.
- Configure the Storage Account - Follow the on-screen instructions to configure your storage account, selecting the appropriate subscription, resource group, and other relevant settings.
- Open Storage Account - Once the storage account is created, open it.
- Create Container - In the storage account dashboard, locate the 'Containers' section and create a new container. Assign a name and set the access to Private (no anonymous access)
Enable Storage Account Key Access - In the storage account settings, go to Configuration. Ensure Allow storage account key access is enabled, which is essential for CloudFiles integration.
Update CORS settings - In the storage account settings, go to Resource Sharing (CORS). Add CORS rules to allow GET/PUT methods. For the URL, enter your Salesforce domain and https://salesforce.cloudfiles.io. Ensure you include both sandbox and production URLs, depending on where the account will be used. CloudFiles URL is required to view files inside salesforce
Add Storage Blob Delegator Permission - In the storage account settings, go to Access Control (IAM). Create a new Role Assignment. Select the role: "Storage Blob Delegator". On Members screen, search for "CloudFiles" service principal.
Add Storage Blob Data Contributor Permission - In the container settings, go to Access Control (IAM). Create a new Role Assignment. Select the role: "Storage Blob Data Contributor". On Members screen, search for "CloudFiles" service principal.
Open CloudFiles Setup in Salesforce - Log into your Salesforce account and navigate to the CloudFiles setup. Go to libraries section and click on Connect New
Add the following URL to trusted URLs in Salesforce:
https://{storageAccountName}.blob.core.windows.net
For example, if storage account name is cloudfiles , URL will be: https://cloudfiles.blob.core.windows.net