web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Increase maximum file ...
Power Apps
Unanswered

Increase maximum file fize limit for a "File" Column in Dataverse

(0) ShareShare
ReportReport
Posted on by 187

Hello,

 

I have a Power Apps and Power Pages project in production for a while that uses Microsoft Dataverse and I have encountered a limitation that I am trying to resolve.

 

In my schema, I have a column of type "File" for which the "Maximum file size" is set to 32MB. I need to increase this limit to accommodate larger files, but the option to edit this setting is grayed out in the column properties.

 

Is there a simple way to increase the file size limit beyond 32MB for an existing "File" column in Dataverse ?

 

I appreciate any guidance or suggestions you might have on how to address this issue.

Thank you !

Charles

I have the same question (0)
  • Guido Preite Profile Picture
    1,490 Super User 2024 Season 1 on at

    the size cannot be changed after it has been created, so the field should be deleted and recreated.

    there is a post explaining another approach to update the value

    https://www.c-sharpcorner.com/article/update-size-of-file-column-in-dataverse-table/

    but I don't know if it still work (so my suggestion will be to delete and recreate the field)

  • Rahman1005 Profile Picture
    109 on at

    Hi,

    Could you please refer below article to increase file size

    https://powerusers.microsoft.com/t5/Power-Apps-Community-Blog/How-to-Increase-File-Column-Size-in-Dataverse/ba-p/1803670

  • AhmedSalih Profile Picture
    6,680 Moderator on at

    Hello, @CharlesPP, to add to what what @GuidoPreite, has mentioned, The MaxSizeInKB value cannot be changed in Power Apps using the designer after you create the file column. You can use the API to update the MaxSizeInKB property. Update a column using Web API and Update a column using SDK

     

    More information: https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/create-update-column-definitions-using-web-api#update-a-column

     

     


    If my reply helped you, please give a 👍 If it solved your issue, please give a 👍 & accept it as the Solution to help other community members find it more.

    Visit my Blog: ahmedsalih.blog

    Visit my YouTube Channel: https://www.youtube.com/@powerplatformplace/videos

    Microsoft Business Application MVP

  • CharlesPP Profile Picture
    187 on at

    Thank you @GuidoPreite for this proposal, which seems feasible and not too risky!

  • CharlesPP Profile Picture
    187 on at

    Thanks @Rahman1005 , but I have the impression that this article explains the change at column creation, not at editing.

  • CharlesPP Profile Picture
    187 on at

    Thank you @AhmedSalih @for your reply, which sounds promising!

    However, I can't get the result I'm looking for. I've written the code below, but I get a 401 (Unauthorized) error on the first request.
    To obtain the token, I created an Azure AD application with Dynamics CRM -> user_impersonation permissions.

    Here's the C# code I used:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Net.Http.Headers;
    using System.Net.Http;
    using System.Text;
    using System.Threading.Tasks;
    
    namespace Change_Dataverse_file_column_max_size
    {
     internal class Program
     {
     static async Task Main(string[] args)
     {
     await UpdateColumn();
     }
    
     private static async Task UpdateColumn()
     {
     using (HttpClient client = new HttpClient())
     {
     client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "[my_token]");
     client.DefaultRequestHeaders.Add("OData-MaxVersion", "4.0");
     client.DefaultRequestHeaders.Add("OData-Version", "4.0");
     client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
    
     string instanceUrl = "https://[my_org].crm12.dynamics.com";
     string tableName = "cg_commande";
     string columnName = "cg_fichierstl";
    
     string attributeUrl = $"{instanceUrl}/api/data/v9.2/EntityDefinitions(LogicalName='{tableName}')/Attributes(LogicalName='{columnName}')/Microsoft.Dynamics.CRM.ImageAttributeMetadata";
    
     // Get existing attributes
     HttpResponseMessage response = await client.GetAsync(attributeUrl);
     response.EnsureSuccessStatusCode();
     string attributeJson = await response.Content.ReadAsStringAsync();
    
     // Update the column by changing the MaxSizeInKB property and then sending a PUT request with the updated JSON
     attributeJson = attributeJson.Replace("\"MaxSizeInKB\": 32768", "\"MaxSizeInKB\": 65536");
     HttpContent content = new StringContent(attributeJson, Encoding.UTF8, "application/json");
     HttpResponseMessage updateResponse = await client.PutAsync(attributeUrl, content);
     response.EnsureSuccessStatusCode();
    
     Console.ReadKey();
     }
     }
     }
    }

     Thanks in advance!
    Charles

  • CharlesPP Profile Picture
    187 on at

    Hello,

    I'd like to reopen the subject.


    Do you have any idea why I'm getting the 401 Unauthorized error with the following code? I did create an Azure AD application with the Dynamics CRM.user_impersonation permission.

     

    Here is the code used to generate the token:

    public static async Task<string> GetToken(string tenantId, string clientId, string clientSecret, string instanceUrl)
     {
     using (var client = new HttpClient())
     {
     string url = $"https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token";
    
     var data = new Dictionary<string, string>
     {
     ["client_id"] = clientId,
     ["scope"] = $"{instanceUrl}/.default",
     ["client_secret"] = clientSecret,
     ["grant_type"] = "client_credentials"
     };
    
     var request = new HttpRequestMessage(HttpMethod.Post, url) { Content = new FormUrlEncodedContent(data) };
    
     var response = await client.SendAsync(request);
     if (!response.IsSuccessStatusCode)
     {
     Console.WriteLine($"Error obtaining token: {response.StatusCode}");
     return null;
     }
    
     var json = await response.Content.ReadAsStringAsync();
     var tokenResponse = JsonConvert.DeserializeObject<Dictionary<string, string>>(json);
    
     return tokenResponse != null && tokenResponse.ContainsKey("access_token") ? tokenResponse["access_token"] : null;
     }
     }
     }

     

    Many thanks in advance !

    Charles

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard