title: Azure Information Protection & Sensitivity Options in C#?
body: <p>We have reports that are automatically generated within Excel via Interop functionality in C#.</p>
  
  <p>There were recent changes to the Microsoft Office suite amongst the teams that requires all documents to have a specifically classified "Sensitivity" option - this has some to do with GDPR laws in the being implemented EU.</p>
  
  <p>Specifically, here's a quick FAQ, but I couldn't find anything with detail:
  <a href="https://docs.microsoft.com/en-us/azure/information-protection/get-started/faqs" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/information-protection/get-started/faqs</a></p>
  
  <p>For example, opening a new spreadsheet gives "Sensitivity" options for Personal, Public, Confidential, Restricted (Confidential), etc.</p>
  
  <p>Since these are required now for all documents, I suspect there will be a need to implement a programmatic way, in our existing C# code, to automatically assign a Sensitivity classification - likely 'Confidential.'</p>
  
  <p>However, I am unable to find how this is done, or what the methods/options are to do this.</p>
  
  <p>Is there any documentation on this, or details as to how to do this?</p>
  
  <p>Sample shot of Excel sensitivity options:
  <a href="https://i.stack.imgur.com/yTDeB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yTDeB.png" alt="Excel Sensitivity Options"></a></p>
  
  <p>Sample code, although I don't think it's pertinent to the question necessarily:</p>
  
  <pre><code> Application xlObject = new Microsoft.Office.Interop.Excel.Application();
   xlObject.DisplayAlerts = false;
  
   Workbook xlMainWorkbook = xlObject.Workbooks.Add();
   xlMainWorkbook.SaveAs(("\\ReportFile", Env.XLFixedFormat);
  </code></pre>