Create an Azure Storage Data Stream
Set Up Unstructured Data from Azure Storage
MuleSoft Anypoint Connector for Salesforce Data 360
Connect unstructured data from Azure Storage for use in your Agentforce, RAG, automation, and analytics workflows. First create an unstructured data lake object (UDLO) in Data 360 to reference the unstructured data. Then create a file notification pipeline to keep your UDLO up to date.
See the Unstructured Data File Formats and Connectors for a list of support file formats for unstructured data.
To ensure your unstructured data is properly connected to Data 360, first perform the steps to connect unstructured data from your external blob store, then set up file notifications, and finally put data in your external blob store.
Important
Create a UDLO in Data 360 to reference unstructured data from Azure Storage.
| User Permissions Needed | |
|---|---|
| To connect unstructured data from an external blob store: | Data Cloud Architect |
Before you begin:
Make sure you’ve set up a connection to Azure Storage.
Create a file notification pipeline for Azure Storage to notify a Salesforce connected app whenever unstructured data files are added, updated, or deleted from a bucket.
Required User Permissions
| User Permissions Needed | |
|---|---|
| Azure storage account and container | Contributor role set at the resource group level |
| Azure Key Vault Crypto Officer, Key Vault Secrets Officer, and Key Vault Data Access Administrator | Set at the Resource Group level |
| Azure CLI | - |
| Azure Functions Core Tools | - |
To configure OAuth for the connected app you will use in your file notification pipeline, create a private/public RSA key pair and a digital x509 certificate.
If you already have a connected app that you want to use, ensure that you have the private/public RSA key pair you used to create the x509 certificate for that app, as you need them to enable OAuth in a subsequent step.
Note
From your terminal, change directories to any folder.
Create the private/public key pair.
1openssl genrsa -out keypair.pem 2048Create a digital certificate from the key pair.
1openssl req -new -x509 -nodes -sha256 -days 365 -key keypair.pem -out certificate.crtComplete the questions as prompted.
Create a pkcs8 private key from the key pair.
1openssl pkcs8 -topk8 -nocrypt -in keypair.pem -out private.keyKeep the private/public key pair and the digital x509 certificate, as you need them in the following task.
Set up a connected app to use in the file notification pipeline and apply necessary OAuth settings.
1<YOUR_ORG_URL>/services/oauth2/authorize?response_type=code&client_id=<YOUR_CONSUMER_KEY>&scope=api refresh_token cdp_ingest_api&redirect_uri=<YOUR_CALLBACK_URL>&code_challenge=SHA256The install script is supported on macOS and Linux operating systems.
installers/azure folder.input_parameters_azure.conf and replace the environment variable values with your values.1chmod +x setup_azure_file_notification.sh
2 ./setup_azure_file_notification.sh input_parameters_azure.confRefer to these variables when creating a file notification pipeline from an Azure blob store to Data 360.
| Variable | Definition |
|---|---|
RESOURCE_GROUP | Contains the name of your Azure resource group |
LOCATION | Your Azure location |
CONTAINER_NAME | The name of the container with your unstructured data files. Container name must start and end with a letter or number, and can only contain lowercase letters, numbers, and hyphens |
STORAGE_ACCOUNT | Contains the ID of your Azure storage account |
SF_USERNAME | Your Salesforce org username |
SF_LOGIN_URL | Your Salesforce org login URL |
SOURCE_CODE_LOCAL_PATH | The local path for your function’s source code |
APP_NAME | The name of the function app |
TOPIC_NAME | The name of the system topic used to publish events |
SUBSCRIPTION_NAME | The name of the topic subscriber that listens to the system topic |
KEY_VAULT_NAME | Contains the name of your Azure Key Vault instance |
CALLBACK_URL | Contains the callback URL (endpoint) that Salesforce calls back to your application during OAuth |
PEM_FILE_PATH | Contains the complete path to the keypair.pem file on your local machine. For example: /Users/Name/Documents/keypair.pem |
CONSUMER_KEY_VALUE | The Consumer Key created in your connected app |
These common issues can occur when setting up a connected app or Azure Storage file notification in Data 360. If you don’t see data connected in your org after loading unstructured data into Azure and creating a file notification pipeline, review these requirements.
Connected App
Ensure that you have:
.crt file in the connected app, not a .pem or .key file..pem file when creating the RSA private key..crt, .pem, and .key) for both the cloud function and the connected app.Unstructured Data Files and UDLO Creation
Ensure that you have:
data, and you configure the UDLO directory field as files, Data 360 looks for files at this path: <Cloud Provider Bucket>/data/files.Installer Script and Cloud Function
Ensure that you have:
Additional Troubleshooting
| Section | Issue | Reason | Solution |
|---|---|---|---|
| Connected App | 400 error in cloud function logs | The certificate (.crt) file used in the connected app is not associated with the RSA private key file (.pem) uploaded to the cloud provider. | Recreate the keys and replace the existing key (.pem) file uploaded to the cloud provider with the certificate file used in the connected app. |
| Connected App | 403 error in cloud function logs | The connected app Org URL does not properly execute or is not available. | Ensure OAuth scopes are set properly and that the Org URL is reachable from a browser. |
| Connected App | 400 error in cloud function logs | The connected app policy settings are incorrect. | Edit the policies in the connected app: Set IP configuration to Relax IP restrictions and enable OAuth username and password. |
| Data explorer | Files uploaded to the cloud bucket/container are not refreshed in UDLO/UDMO | Incorrect file types were uploaded, for example, a UDLO is set to accept PDF files but HTML files were uploaded. | Upload the correct file types, or create new UDLOs for the file types and upload the files again. |
| Azure Installer | Storage Account can’t be upper case and should be between 3 to 24 characters in length | Storage Account uses uppercase characters or the character count is 2 or above 24. | Ensure the Storage Account uses lowercase characters and a character count between 3 to 24. |
| Azure Installer | Not able to generate CDP access token | The name or pattern of the secret keys does not match CONSUMER_KEY_<YOUR_OWN_SUFFIX> and RSA_PRIVATE_KEY_<YOUR_OWN_SUFFIX>. | Ensure your secret keys use this pattern: CONSUMER_KEY_<YOUR_OWN_SUFFIX> and RSA_PRIVATE_KEY_<YOUR_OWN_SUFFIX>. |