The process of building custom applications and tools that interact with Microsoft SharePoint, including SharePoint Online in Microsoft 365.
Hi @Vineeth Kumar
Thank you for reaching out to our Q&A forum.
After doing some research, GetFileByServerRelativePath endpoint is designed to download the full content of the file which result in ignoring the range header.
If the server ignores the header, it returns a 200 code and download the full content.
You can read here for more details: Range header - HTTP | MDN
Note: This information is provided as a convenience to you. These sites are not controlled by Microsoft, and Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please ensure that you fully understand the risks before using any suggestions from the above link.
I also found that Graph API does support downloading with range header. If possible, you can consider using this: Download driveItem content - Microsoft Graph v1.0 | Microsoft Learn
I hope this information helps.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.