Showing results for 
Search instead for 
Did you mean: 

Using Microsoft Flow in combination with IRM & Sharepoint to address DLP scenarios



  • Customer leverages legacy BI/Visualization/Reporting tool to share key insights with the their leadership team over email. 
  • "PDF” is the chosen format and into which the team has invested considerable time and effort.
  • Automated using business logic built "over-the-years" and not so agile tool, making changes at the source level is a No-GO. 
  • Includes scenarios across:-
    • Single user + Single attachment
    • Multiple users + Single attachment
    • Multiple Users + Multiple attachments




  • Data was getting leaked with the PDFs/excerpts getting shared outside the organization.
  • No central repository of these reports for auditing / e-discovery


Tech Challenge


  • A simplistic way to ensure that all attachments (PDF) in the email originating from the legacy reporting publishing engine were encrypted.
  • We could have leveraged office365 Message Encryption, but we do not yet protect a PDF embedded as an attachment.
  • Un-willingness/In-ability to leverage Word / Excel based templates over PDF.  



  • Microsoft Flow.
  • A high-level flow is as below:-
    • Legacy system generates the email AS-IS the current process.
    • Transport Rule on Exchange Online intercepts the email and “Redirects” it to the generic Mailbox.
    • Microsoft Flow is triggered on the arrival of a new email into their generic Mailbox.
    • It creates a copy of these attachments onto the IRM enabled document library within SharePoint Online.
    • Fetches the attachments into an Array @ runtime
    • Composes and sends out the email to the intended recipients.  
    • NOTE: from an end-user POV, nothing changes, except that the attachment is now encrypted and accessible ONLY via the Azure Information Protection viewer and subject to all IRM policies.  

 Key references


Meet Our Blog Authors
  • Working daily with Microsoft Cloud to deliver the needs of my company, my customers and various Microsoft communities and forums. | Office 365 | Flow | PowerShell | PowerApps | SharePoint |
  • Co-founder of, Office 365 and SharePoint expert. Passionate about design and development of easy to use, convenient and flexible products.
  • Microsoft Business Apps MVP. Owner of ThriveFast, an Office 365 consulting company.
  • 7x Microsoft Business Solutions MVP (CRM)
  • Solution Architect with Slalom, and organizer of the Boston Office 365 User Group, and long term SharePoint/Office 365 veteren. Find more at Follow @DavidLozzi
  • I'm keen in MS technologies, SharePoint, Office 365 and development for them
  • Daniel is a Business Productivity Consultant & Microsoft Business Solutions MVP who is very enthusiastic about all things Office 365, Microsoft Flow, PowerApps, Azure & SharePoint (Online). Since the preview, Daniel has been working with Microsoft Flow and later on with Microsoft PowerApps. That led to him being awarded an MVP Award for Business Solutions. He loves to blog, present and evangelize about improving productivity in the modern workspace with these amazing tools!
  • Michelle is an Office 365 solution architect in Twin Cities, MN. She has been delivering business collaboration solutions for years with her focus on SharePoint and Office 365. Michelle is a recent board member of the Minnesota Office 365 User Group and has been a member of the SharePoint community since 2009. She is a frequent speaker at MNSPUG and SharePoint Saturday and co-chaired the Legal SharePoint User Group for 4 years. Her most frequent projects have involved rolling out a large deployment of Office 365, SharePoint Online intranet, build of a "CHAMPS" Office 365 user adoption program and most recently, SharePoint On-Premise to Online Migration. Michelle is very excited about cloud technology as it is shifting her IT Pro focus to collaboration strategy and technical adoption.
  • I'm a Microsoft Office Servers and Services MVP with a special interest in SharePoint, Office 365, Microsoft Flow, Microsoft Teams and PowerApps. I work at Triad Group Plc (