Moving on from Send-MailMessage: Sending Email from PowerShell using the Graph API

%3CLINGO-SUB%20id%3D%22lingo-sub-2425584%22%20slang%3D%22en-US%22%3EMoving%20on%20from%20Send-MailMessage%3A%20Sending%20Email%20from%20PowerShell%20using%20the%20Graph%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2425584%22%20slang%3D%22en-US%22%3E%3CP%3EMany%20PowerShell%20scripts%20use%20the%20Send-MailMessage%20cmdlet%20to%20send%20mail.%20That%E2%80%99s%20fine%2C%20but%20if%20you%20want%20to%20remove%20basic%20authentication%20to%20improve%20tenant%20security%2C%20you%20need%20to%20stop%20using%20Send-MailMessage.%20One%20solution%20is%20to%20move%20to%20use%20the%20Graph%20API%20SendMail%20call.%20This%20works%20fine%2C%20but%20it%20creates%20some%20new%20security%20issues%20that%20need%20to%20be%20thought%20through.%20In%20this%20article%2C%20we%20explain%20how%20to%20use%20the%20Graph%20to%20send%20email%20and%20some%20of%20those%20security%20considerations%20to%20ponder.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fpractical365.com%2Fupgrade-powershell-scripts-sendmailmessage%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fpractical365.com%2Fupgrade-powershell-scripts-sendmailmessage%2F%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2425584%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExchange%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
MVP

Many PowerShell scripts use the Send-MailMessage cmdlet to send mail. That’s fine, but if you want to remove basic authentication to improve tenant security, you need to stop using Send-MailMessage. One solution is to move to use the Graph API SendMail call. This works fine, but it creates some new security issues that need to be thought through. In this article, we explain how to use the Graph to send email and some of those security considerations to ponder.

 

https://practical365.com/upgrade-powershell-scripts-sendmailmessage/

0 Replies