Cannot Extract Text from One Drive Office Files due to assigned SensitivityLabels

DADemoUser 0 Reputation points

Hi , I have one WebAPI which extracts Text from document (using temporary File generated after downloading onedrive download Url). This document is uploaded from teams chat and is stored in one drive under ms chat files folder. So for .docx file , it is returning as 400( Bad request) -file is corrupted or has invalid unsupported file format but for .pdf files , it is able to extract the text without any error .This 400 error is due to the sensitivity labels assigned to files after uploading to teams . Can someone guide me on how to remove those sensitivity labels after downloading the file to temporary location. Any help is appreciated. Thank You.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,873 questions
0 comments No comments
{count} votes