Downloading word file having sensitivity-label from SharePoint using graph api with format=pdf is loosing the label info

spm 20 Reputation points
2024-07-16T10:15:37.5833333+00:00

I have a word file in SharePoint Online document library, this file has Sensitivity label assigned to it. I am downloading this file using Graph SDK with query parameter 'format=pdf'. The file is successfully downloaded and saved as pdf, however, the sensitivity labels are lost.

Graph url: Graph url: https://graph.microsoft.com:443/v1.0/drives/b!blTHg...nEk/root:/test03/document.docx:/content?format=pdf

I opened the same file in browser (Open in browser) and clicked on File --> Save as --> Download as PDF; this step retain the sensitivity labels.

Why is the file when downloading from API loosing its labels?

Note:

  • I tried downloading directly using SharePoint URL and there too Label information is lost.
  • The sensitivity labels does not carry any control mechanisms i.e., they are used for information classification.
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.