Description
Dataverse File Name Truncation Error
In the child flow Sharepoint Synchronization | Synchronize files to Agent (Child), the file upload actions pass full SharePoint web URLs/paths to the Dataverse parameter x-ms-file-name instead of just the isolated file name.
Because Dataverse enforces a hard 255-character limit on the underlying FileAttachmentBase.FileName column, any document with a long SharePoint path or URL fails with a 400 Bad Request / 0x80090429 truncation error.
Flow & Component
- Solution: Copilot Studio Kit (
CopilotStudioAccelerator)
- Flow Name:
Sharepoint Synchronization | Synchronize files to Agent (Child)
- Actions Affected:
Upload_a_file
Upload_page_as_file
Root Cause Details
Upload_a_file action
- Current Mapping:
"x-ms-file-name": "@items('Apply_to_each_file')?['{Link}']"
- Issue:
{Link} passes the full web URL (e.g. https://tenant.sharepoint.com/sites/.../file.docx?d=...), which frequently exceeds 255 characters.
- Expected Mapping:
@items('Apply_to_each_file')?['{FilenameWithExtension}']
Upload_page_as_file action
- Current Mapping:
"x-ms-file-name": "@{items('Apply_to_each_File_Indexer_Configurations')?['cat_siteaddress']}/SitePages/@{items('Apply_to_each_page')?['FileLeafRef']}"
- Issue: Prepends the full site path to the page leaf reference.
- Expected Mapping:
@items('Apply_to_each_page')?['FileLeafRef']
Error Response
{
"error": {
"code": "0x80090429",
"message": "String or binary data would be truncated..."
}
}
Suggested Fix
Update the managed flow definition so that both Upload_a_file and Upload_page_as_file map x-ms-file-name exclusively to file names ({FilenameWithExtension} / FileLeafRef) rather than full URLs or site paths.
Steps to reproduce
Steps
- Configure SharePoint Synchronization for a document library where full file links exceed 255 characters.
- Trigger the sync process via
Sharepoint Synchronization | On Demand.
- Inspect the child flow run under
Upload_files_to_Copilot_Studio > Upload_a_file.
- Observe the flow failure on the Dataverse file upload step with error
0x80090429.
Expected behavior
Child flow runs successfully for file sync
Actual behavior
Flow fails to finish syncing files
Environment
No response
Additional context or logs
No response
Description
Dataverse File Name Truncation Error
In the child flow
Sharepoint Synchronization | Synchronize files to Agent (Child), the file upload actions pass full SharePoint web URLs/paths to the Dataverse parameterx-ms-file-nameinstead of just the isolated file name.Because Dataverse enforces a hard 255-character limit on the underlying
FileAttachmentBase.FileNamecolumn, any document with a long SharePoint path or URL fails with a400 Bad Request/0x80090429truncation error.Flow & Component
CopilotStudioAccelerator)Sharepoint Synchronization | Synchronize files to Agent (Child)Upload_a_fileUpload_page_as_fileRoot Cause Details
Upload_a_fileaction{Link}passes the full web URL (e.g.https://tenant.sharepoint.com/sites/.../file.docx?d=...), which frequently exceeds 255 characters.Upload_page_as_fileactionError Response
{ "error": { "code": "0x80090429", "message": "String or binary data would be truncated..." } }Suggested Fix
Update the managed flow definition so that both
Upload_a_fileandUpload_page_as_filemapx-ms-file-nameexclusively to file names ({FilenameWithExtension}/FileLeafRef) rather than full URLs or site paths.Steps to reproduce
Steps
Sharepoint Synchronization | On Demand.Upload_files_to_Copilot_Studio>Upload_a_file.0x80090429.Expected behavior
Child flow runs successfully for file sync
Actual behavior
Flow fails to finish syncing files
Environment
No response
Additional context or logs
No response