Dataverse File and Image Columns
Earn 25 points (50 with Pro) in two steps
- ① Read through the lesson — each section gets a ✓ as you scroll through it.
- ② When every section has a ✓, tap Complete lesson.
0 of 13 read · keep scrolling
✦ See fewer ads and earn double points — 50 a lesson instead of 25 — with Pro
Mastering Dataverse File and Image Columns
Introduction: Why Data Storage Matters in Dataverse
When building enterprise applications on the Microsoft Power Platform, we often focus heavily on structured data—names, dates, currency values, and relational keys. However, modern business processes are rarely limited to text and numbers. From capturing employee headshots and product catalog photos to storing signed contracts, PDF reports, and technical manuals, unstructured data is a fundamental component of any functional system.
In Dataverse, the specialized mechanisms for handling this data are File columns and Image columns. Understanding these is not just about knowing where to click in the Power Apps portal; it is about understanding how to optimize performance, manage storage costs, and ensure data integrity within your environment. If you misconfigure these columns, you risk ballooning your storage costs, slowing down your application’s load times, and creating security gaps. This lesson explores the technical architecture of these column types, how to implement them effectively, and the best practices required to maintain a high-performing environment.
Not read yet
Understanding Dataverse Storage Architecture
Before diving into the configuration of File and Image columns, it is helpful to understand where this data actually lives. Dataverse utilizes a tiered storage architecture. While standard relational data (strings, integers, booleans) is stored in the primary SQL Server database, large unstructured data—specifically files and images—is stored in Azure Blob Storage.
This separation is intentional and vital for system health. By offloading binary large objects (BLOBs) to Azure storage, Dataverse maintains the responsiveness of its relational database engine. When a user requests a record, Dataverse fetches the metadata (the reference to the file) from SQL Server and retrieves the actual binary content from the blob store only when requested. This architecture allows you to scale your file storage independently of your relational database capacity, though it does impact how we interact with the data via APIs and Power Automate.
Not read yet
The Image Column: A Specialized Data Type
The Image column is designed specifically for, as the name suggests, images. It is not intended for general file storage. When you add an Image column to a table, Dataverse provides built-in capabilities that go beyond simple storage.
Key Characteristics of Image Columns
- Thumbnail Generation: Dataverse automatically generates thumbnails for images stored in these columns. This is crucial for UI performance. When displaying a list of records in a gallery or a view, the system loads the lightweight thumbnail rather than the high-resolution original, ensuring the app remains snappy.
- Size Constraints: By default, Image columns are optimized for smaller files. While you can store larger images, the system imposes a maximum size (typically 30MB) to prevent performance degradation.
- Built-in UI Controls: When you use an Image column in a model-driven app form, the platform provides a native control that allows users to upload, remove, or edit the image directly from the browser without needing custom code.
When to Use Image Columns
You should choose an Image column when the data is strictly visual and serves a functional purpose within the interface, such as:
- User or employee profile photos.
- Product icons or catalog images.
- Logos for customer or account records.
Callout: Image Column vs. File Column It is a common mistake to use an Image column for documents or generic file attachments. An Image column is specifically processed for rendering. It includes metadata for dimensions and thumbnail generation. A File column is a generic container for any binary stream. If you try to store a PDF in an Image column, the system will fail to generate a thumbnail, and you will lose the specific file management benefits of the File column type.
Not read yet
The File Column: The Workhorse of Unstructured Data
The File column is the more flexible sibling of the Image column. It is designed to handle any file type, such as .pdf, .docx, .xlsx, .zip, or .txt. Unlike the Image column, it does not attempt to process the file for display; it simply stores the binary stream and provides a way to download or access that stream via the API.
Technical Capabilities
- Unlimited File Types: You can configure the column to accept specific file extensions if you wish to restrict user uploads, or you can leave it open to accept any file type.
- Direct API Access: Files stored in these columns are fully accessible via the Dataverse Web API. This makes them ideal for integration scenarios where you need to move documents between Dataverse and external systems like SharePoint or Azure storage.
- Storage Reporting: Because these files count toward your Dataverse File storage quota, they are tracked in the Power Platform Admin Center. This allows administrators to see exactly how much storage is being consumed by attachments versus actual database records.
Not read yet
Step-by-Step: Adding File and Image Columns
To add these columns to your Dataverse tables, you will use the Power Apps maker portal. The process is straightforward but requires attention to detail regarding column properties.
Adding an Image Column
- Navigate to make.powerapps.com.
- Select your environment and open the relevant Table.
- Click on + New Column.
- Provide a display name and select Image from the Data type dropdown menu.
- Important: Under the "Advanced options" section, you can specify the maximum file size. Keep this as small as your business requirements allow to maintain optimal performance.
- Click Save.
Adding a File Column
- In the same Table view, click + New Column.
- Provide a display name and select File from the Data type dropdown menu.
- Configure the File size limit. The default is usually 32MB, but you can increase this up to 128MB depending on your specific needs.
- Click Save.
Note: Once you save a column as a File or Image type, you cannot change its data type back to a text or number field. Ensure your requirements are finalized before committing to the column creation in your production environment.
Not read yet
Integration and Code: Interacting with File/Image Data
The true power of these columns is unlocked when you interact with them programmatically. Because the files are stored in Azure Blob Storage, you cannot simply query the "content" of the file in a standard SQL SELECT statement. Instead, you must use the Dataverse Web API to upload and download the binary data.
Uploading a File via Web API
To upload a file, you perform a two-step operation. First, you create the record to hold the file reference. Second, you use a PUT request to upload the binary content to the specific column.
// Step 1: Create the record (assuming the column is called 'new_document')
POST [Organization URI]/api/data/v9.2/new_documents HTTP/1.1
Content-Type: application/json
{
"new_name": "Project Proposal"
}
// Step 2: Upload the file content to the column
PUT [Organization URI]/api/data/v9.2/new_documents(GUID)/new_document/$value HTTP/1.1
Content-Type: application/octet-stream
[Binary Data Here]
Downloading a File via Web API
Downloading is similarly a direct access operation. You point your request to the $value property of the column.
GET [Organization URI]/api/data/v9.2/new_documents(GUID)/new_document/$value HTTP/1.1
Accept: application/octet-stream
Tip: When handling large files in your code, always implement a retry logic. Network interruptions during the transmission of binary streams are common. Using a library that supports chunked uploads or native HTTP retry policies will save you significant headache in production-level integrations.
Not read yet
Performance and Storage Optimization
As your Dataverse environment grows, storage management becomes a critical operational task. Because File and Image columns store data outside the primary SQL database, they are often overlooked until a storage alert is triggered.
Strategies for Managing Storage Growth
- Automated Archiving: If you have records that are older than a certain date (e.g., invoices from three years ago), consider using Power Automate to move the file content to SharePoint or Azure Blob storage and then clear the File column in Dataverse. This keeps your Dataverse environment lean.
- Size Limits: Always set the minimum necessary file size limit on your columns. If your users only ever upload small PDFs, do not set the limit to 128MB. Restricting the size prevents users from accidentally uploading massive video files that you didn't intend to store.
- Dataverse File Storage Reports: Regularly monitor the Power Platform Admin Center. Under the Resources > Capacity section, you can see a breakdown of your storage. If you notice your File storage is spiking, you can drill down to see which tables or columns are responsible.
Not read yet
Common Pitfalls and How to Avoid Them
Even experienced developers fall into common traps when working with unstructured data in Dataverse. Here are the most frequent issues and how to avoid them.
1. Using File Columns for High-Frequency Read/Write
Dataverse is not a content management system (CMS). If you are building an application where files are being edited and saved every few seconds, you will eventually hit API limits and encounter performance bottlenecks. If your use case involves high-frequency document editing, consider using SharePoint as your storage layer and simply storing the link to the SharePoint document in Dataverse.
2. Ignoring Thumbnail Performance
When using Image columns, developers often forget that the system generates multiple sizes. If you are building a custom PCF (Power Apps Component Framework) control to display these images, ensure you are requesting the thumbnail size rather than the full-resolution image. Requesting the full image for every row in a list will cause your app to lag significantly as it tries to download megabytes of data for every record.
3. Mismanaging Security Roles
Permissions for File and Image columns are tied to the table permissions. However, some developers assume that if a user can see the record, they can automatically see the file. Ensure that your security roles are properly configured with "Read" access to the specific table. If a user does not have the correct permissions, the download request will return a 403 Forbidden error, which can be difficult to debug if you aren't checking the specific HTTP response.
4. Relying on Dataverse as a Backup
Never treat Dataverse as your primary long-term backup for business-critical documents. While Dataverse is reliable, it is a transactional platform. If you have compliance requirements to keep contracts for seven years, implement a data lifecycle policy that offloads these files to long-term cold storage (like Azure Archive Storage) after a defined period.
Not read yet
Comparison Table: Storage Options
| Feature | Dataverse File Column | SharePoint Document Library | Azure Blob Storage |
|---|---|---|---|
| Primary Use | Transactional app files | Document collaboration | Large scale/Archive |
| Access | Dataverse API | SharePoint API / UI | Azure SDK |
| Security | Dataverse Security Roles | SharePoint Permissions | IAM / SAS Tokens |
| Performance | High (for small/med files) | Moderate | Very High |
| Management | Integrated in Power Apps | Office 365 environment | Azure Portal |
Best Practices for Enterprise Implementations
To ensure your implementation remains maintainable and scalable, follow these industry-standard practices:
- Naming Conventions: Use clear, descriptive names for your File and Image columns. Since these columns can be accessed via API, a name like
new_signed_contract_pdfis much more useful thannew_file1. - Validation: Use Power Automate to validate file types before they are processed. If you only want to accept PDFs, you can check the file extension or the MIME type in your flow and alert the user if they try to upload a restricted file type.
- Monitoring: Set up alerts in the Power Platform Admin Center to notify you when your storage reaches 80% capacity. This gives you time to archive data before your environment hits its limit and prevents users from being able to upload new records.
- PCF Controls: If the standard form controls do not meet your business needs, look into the PCF gallery for community-built controls that offer advanced features like image cropping, drag-and-drop uploads, or multi-file support.
- Audit Logs: Enable auditing on tables that contain sensitive files. This allows you to track who uploaded, modified, or downloaded specific documents, which is a common requirement for regulatory compliance (e.g., GDPR, HIPAA).
Not read yet
Advanced Scenario: The "Document Management" Pattern
In many enterprise scenarios, you will find that a simple File column is not enough. You might need version control, metadata tagging, and approval workflows. In these cases, the best approach is to combine Dataverse with SharePoint.
How to Implement the Hybrid Pattern:
- Dataverse Table: Store the metadata (e.g., Document Name, Expiration Date, Assigned Owner) in a Dataverse table.
- SharePoint Library: Store the actual file in a SharePoint document library.
- Integration: Use Power Automate to trigger when a record is created in Dataverse. The flow creates a folder in SharePoint, and potentially uploads a template. When a user uploads a file to the SharePoint library, the flow updates the Dataverse record with the URL to the document.
This pattern leverages the strengths of both platforms: Dataverse provides the relational structure and security, while SharePoint provides the robust document management and collaboration features.
Callout: When to use the Hybrid Pattern Use the hybrid Dataverse/SharePoint pattern if your documents require version history, co-authoring (multiple people editing at the same time), or advanced document lifecycle management. Use native Dataverse File columns when the document is an "artifact" of the record (e.g., a signed receipt attached to an expense report) that does not require ongoing editing or collaboration.
Not read yet
Troubleshooting Common Issues
"File not found" Errors
If you are attempting to download a file via the API and receive a "File not found" error, verify that the record actually contains a file. In Dataverse, a File column can be empty (null). Always check for the existence of the file before attempting a download request.
Slow Load Times in Model-Driven Apps
If your forms are loading slowly, check the number of Image columns on the form. Each Image column requires a separate call to the server to render the thumbnail. If you have many images, try moving them to a separate tab so they only load when the user navigates to that section.
Security and Access Denied
If you are using an application user or a service principal to access files via the API, ensure that the service principal is assigned a security role that has "Read" access to the table. Also, verify that the "Allow access to file/image content" permission is explicitly granted in the security role settings.
Not read yet
Frequently Asked Questions (FAQ)
Q: Can I store videos in Dataverse? A: Technically, yes, if the file size is under your configured limit (up to 128MB). However, it is strongly discouraged. Dataverse is not a streaming platform. You should store videos in a dedicated video service like Microsoft Stream or Azure Media Services and store only the link in Dataverse.
Q: How do I back up my files? A: Dataverse backups include the file content. However, for long-term compliance, you should export files periodically to an external storage service.
Q: Can I search for text inside my files? A: Dataverse does not natively index the contents of files stored in File columns for search. If you need search capabilities (e.g., "find all PDFs containing the word 'Contract'"), you should integrate with Azure AI Search.
Q: Does the Dataverse storage limit include the metadata? A: No, the 128MB/32MB limit applies only to the file content. The metadata (the record itself) counts toward your Database storage capacity, not your File storage capacity.
Not read yet
Key Takeaways
- Know Your Storage Types: Always choose the Image column for visual assets that require thumbnailing and the File column for general document storage. Using the wrong type leads to performance issues and lost functionality.
- Leverage Azure Blob Storage: Understand that Dataverse offloads these files to Azure. This makes your primary database faster but requires you to manage file storage quotas separately.
- Optimize for Performance: Never load full-resolution images if you only need a thumbnail. Always use the
$valueAPI endpoint and be mindful of the performance impact of rendering too many files on a single form. - Plan for Lifecycle Management: Don't let your storage grow indefinitely. Implement archiving or data deletion policies early in your project lifecycle to keep your environment costs under control.
- Choose the Right Tool for the Job: Use native File columns for simple attachments and the hybrid SharePoint pattern for complex document management scenarios involving versioning and collaboration.
- Security First: Always ensure that your security roles are configured correctly for both the table and the file content, especially when using service principals for automated integrations.
- Monitor Regularly: Use the Power Platform Admin Center to keep an eye on your storage usage. Proactive management prevents service interruptions and unexpected costs.
By mastering these concepts, you transition from simply "storing files" to architecting efficient, performant, and scalable data solutions within the Power Platform. Whether you are building a simple mobile app for expense tracking or a complex enterprise document management system, these principles will serve as the foundation for your success.
Not read yet
Each section gets a ✓ as you scroll through it. Tap the button to jump to the next one.
- Introduction to Microsoft Power Platform
- Introduction to Microsoft Power Platform Quiz5q
- Value of Power Apps for Building Applications
- Value of Power Apps for Building Applications Quiz5q
- Value of Power Automate for Process Automation
- Value of Power Automate for Process Automation Quiz5q
- Value of Power Pages for Building Websites
- Value of Power Pages for Building Websites Quiz5q
- Value of Connectors for Integration
- Value of Connectors for Integration Quiz5q
- Value of Microsoft Dataverse for Business Data
- Value of Microsoft Dataverse for Business Data Quiz5q
- Dataverse vs Traditional Databases
- Dataverse vs Traditional Databases Quiz5q
- Tables Columns and Relationships in Dataverse
- Tables Columns and Relationships in Dataverse Quiz5q
- Business Logic Options in Dataverse
- Business Logic Options in Dataverse Quiz5q
- Creating Tables and Columns Through Conversations
- Creating Tables and Columns Through Conversations Quiz5q
- Importing and Exporting Data Options
- Importing and Exporting Data Options Quiz5q
- Dataverse Business Rules
- Dataverse Business Rules Quiz5q
- Dataverse Calculated and Rollup Columns
- Dataverse Calculated and Rollup Columns Quiz5q
- Dataverse Security Roles
- Dataverse Security Roles Quiz5q
- Dataverse Teams Integration
- Dataverse Teams Integration Quiz5q
- Dataverse File and Image Columns
- Dataverse File and Image Columns Quiz5q
- Connecting to Data Sources with Connectors
- Connecting to Data Sources with Connectors Quiz5q
- Common Controls in Canvas Apps
- Common Controls in Canvas Apps Quiz5q
- Building Responsive Pages with Containers
- Building Responsive Pages with Containers Quiz5q
- Capabilities of Copilot Controls
- Capabilities of Copilot Controls Quiz5q
- Sharing a Canvas App
- Sharing a Canvas App Quiz5q
- Cloud Flows and Desktop Flows
- Cloud Flows and Desktop Flows Quiz5q
- Cloud Flow Templates
- Cloud Flow Templates Quiz5q
- Connector Triggers and Actions
- Connector Triggers and Actions Quiz5q
- Power Automate Use Cases
- Power Automate Use Cases Quiz5q
- Power Automate Apps and Portals
- Power Automate Apps and Portals Quiz5q
- Desktop Flow Actions
- Desktop Flow Actions Quiz5q
- Process Mining Overview
- Process Mining Overview Quiz5q
- Loops and Branching in Cloud Flows
- Loops and Branching in Cloud Flows Quiz5q
- Creating Cloud Flows with Triggers
- Creating Cloud Flows with Triggers Quiz5q
- Creating Flows Through Conversations
- Creating Flows Through Conversations Quiz5q
- Running and Monitoring Cloud Flows
- Running and Monitoring Cloud Flows Quiz5q
- Testing a Cloud Flow
- Testing a Cloud Flow Quiz5q
- Sharing a Cloud Flow
- Sharing a Cloud Flow Quiz5q
- Creating Sites Using Copilot
- Creating Sites Using Copilot Quiz5q
- Design Studio Workspaces
- Design Studio Workspaces Quiz5q
- Creating and Modifying Pages
- Creating and Modifying Pages Quiz5q
- Configuring Power Pages Components
- Configuring Power Pages Components Quiz5q
- Modifying a Power Pages Theme
- Modifying a Power Pages Theme Quiz5q
- Power Pages Authentication Options
- Power Pages Authentication Options Quiz5q
- Power Pages Web Roles
- Power Pages Web Roles Quiz5q
- Power Pages Table Permissions
- Power Pages Table Permissions Quiz5q
- Power Pages List and Form Components
- Power Pages List and Form Components Quiz5q
- Power Pages Publishing and Deployment
- Power Pages Publishing and Deployment Quiz5q
Spend your points to unlock exam-style practice questions
Spend points to unlock PL-900 exam-style practice questions.
Practice for PL-900