<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Exchange Online Archives - the Sysadmin Channel</title>
	<atom:link href="https://thesysadminchannel.com/office365/exchange-online/feed/" rel="self" type="application/rss+xml" />
	<link>https://thesysadminchannel.com/office365/exchange-online/</link>
	<description>Documenting My Life as a System Administrator</description>
	<lastBuildDate>Fri, 15 Sep 2023 00:50:54 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
<site xmlns="com-wordpress:feed-additions:1">144174110</site>	<item>
		<title>Find Account That Sent Emails From Shared Mailbox using PowerShell</title>
		<link>https://thesysadminchannel.com/find-account-that-sent-emails-from-shared-mailbox-using-powershell/</link>
					<comments>https://thesysadminchannel.com/find-account-that-sent-emails-from-shared-mailbox-using-powershell/#respond</comments>
		
		<dc:creator><![CDATA[Paul Contreras]]></dc:creator>
		<pubDate>Fri, 15 Sep 2023 00:50:54 +0000</pubDate>
				<category><![CDATA[Exchange Online]]></category>
		<category><![CDATA[check who sent email from shared mailbox]]></category>
		<category><![CDATA[Find User Who Sent Email From Shared Mailbox]]></category>
		<category><![CDATA[how to see who sent an email from a shared mailbox]]></category>
		<category><![CDATA[shared mailbox sendas permission audit]]></category>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=4678</guid>

					<description><![CDATA[<p>In a world where email is one of our main methods of communication for business use, having the ability to send emails as a &#8220;generic user&#8221; or shared mailbox helps us hide behind a proxy when needed. While this is&#8230; <a href="https://thesysadminchannel.com/find-account-that-sent-emails-from-shared-mailbox-using-powershell/" class="more-link">Continue Reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://thesysadminchannel.com/find-account-that-sent-emails-from-shared-mailbox-using-powershell/">Find Account That Sent Emails From Shared Mailbox using PowerShell</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In a world where email is one of our main methods of communication for business use, having the ability to send emails as a &#8220;generic user&#8221; or shared mailbox helps us hide behind a proxy when needed.  While this is great in most cases, sometimes we need to know who is the actual person that is sending emails as the shared mailbox.  Today we&#8217;re going to go over the method on how to find the account that sent emails from shared mailbox.</p>
<div id="tableofcontents">
<h2>Table Of Contents</h2>
<ul>
<li><a href="#requirements">Requirements</a></li>
<li><a href="#permissions">Get Recipient Permissions to See Who Has Access</a></li>
<li><a href="#findaccount">Find Account That Sent Emails From Shared Mailbox</a></li>
<li><a href="#conclusion">Conclusion</a></li>
</ul>
</div>
<div id="requirements" style="scroll-margin-top: 15px;"></div>
<h2>Requirements</h2>
<p>In order to have successful results, you will need the following.</p>
<ul>
<li>Exchange Administrator Permissions -or Global Administrator Permissions</li>
<li>Audit Logs Enabled.  Specifically Mailbox Audit logs</li>
<li>Exchange Online Management PowerShell Module</li>
</ul>
<p>&nbsp;</p>
<div id="permissions" style="scroll-margin-top: 15px;"></div>
<h2>Get Recipient Permissions to See Who Has Access</h2>
<p>Before we dive deep into the logs, I always like to narrow down my search by simply seeing who has access to send as that specific account.  If there are only 1-2 users who have access, this narrows things down pretty well.  If there are a dozen or more, then things might get a little tricky and we&#8217;ll need to go into logs.<br />
&nbsp;</p>
<p>Let&#8217;s check to see who has permissions and see if we get lucky.  To find this, we&#8217;re going to use the <a href="https://learn.microsoft.com/en-us/powershell/module/exchange/get-recipientpermission?view=exchange-ps" rel="noopener" target="_blank">Get-RecipientPermission</a> cmdlet from the ExchageOnlineManagement module. </p>
<pre class="brush: powershell; title: ; notranslate">
Get-RecipientPermission testmailbox -AccessRights SendAs | Where-Object {$_.Trustee -ne 'NT AUTHORITY\SELF'}

Identity     Trustee                     AccessControlType AccessRights Inherited
--------     -------                     ----------------- ------------ ---------
Test Mailbox paul@thesysadminchannel.com Allow             {SendAs}     False
</pre>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2023/09/Get-Recipient-Permissions.png" target="_blank" rel="noopener"><img fetchpriority="high" decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2023/09/Get-Recipient-Permissions.png" alt="Get Recipient Permissions" width="1097" height="229" class="aligncenter size-full wp-image-4824" srcset="https://thesysadminchannel.com/wp-content/uploads/2023/09/Get-Recipient-Permissions.png?v=1694735770 1097w, https://thesysadminchannel.com/wp-content/uploads/2023/09/Get-Recipient-Permissions-1024x214.png?v=1694735770 1024w, https://thesysadminchannel.com/wp-content/uploads/2023/09/Get-Recipient-Permissions-768x160.png?v=1694735770 768w" sizes="(max-width: 1097px) 100vw, 1097px" /></a><br />
&nbsp;</p>
<p>In some scenarios it very well may be possible that the account itself sent the email, but for the sake of this article we&#8217;re going to assume someone sent an email with the sendas permissions.  Therefore we added the where clause to not include SELF.</p>
<div id="findaccount" style="scroll-margin-top: 15px;"></div>
<h2>Find Account That Sent Emails From Shared Mailbox</h2>
<p>In the example above, we can see that only one account has access to send as the shared mailbox so it&#8217;s pretty much a no brainer in this scenario.  However, as I mentioned before, some shared mailboxes (or regular mailboxes for that matter) can have multiple people with this access right.<br />
&nbsp;</p>
<p>In order to find the exact user, let&#8217;s look to the logs and see what they say.  Logs never lie!</p>
<pre class="brush: powershell; title: ; notranslate">
$SendAs = Search-MailboxAuditLog -Identity testmailbox -Operations SendAs -ShowDetails
$Sendas | select LogonUserDisplayName, ClientProcessName, ItemSubject, OperationResult, LastAccessed


LogonUserDisplayName : Paul Contreras
ClientProcessName    :
ItemSubject          : The Force
OperationResult      : Succeeded
LastAccessed         : 9/14/2023 8:37:38 PM
</pre>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2023/09/Search-Mailbox-Audit-Log.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2023/09/Search-Mailbox-Audit-Log.png" alt="Search Mailbox Audit Log - Sent Emails From Shared Mailbox" width="988" height="249" class="aligncenter size-full wp-image-4827" srcset="https://thesysadminchannel.com/wp-content/uploads/2023/09/Search-Mailbox-Audit-Log.png?v=1694736549 988w, https://thesysadminchannel.com/wp-content/uploads/2023/09/Search-Mailbox-Audit-Log-768x194.png?v=1694736549 768w" sizes="(max-width: 988px) 100vw, 988px" /></a><br />
&nbsp;</p>
<div id="conclusion" style="scroll-margin-top: 15px;"></div>
<h2>Conclusion</h2>
<p>In this case the recipient permissions pretty much gave it away as I was the only one with permissions.  However, being able to search in the mailbox audit logs will show us EXACTLY which was the account that sent this email.  Hopefully this was informative for you and you&#8217;re able to find out who sent emails from shared mailbox.</p>
<p>The post <a href="https://thesysadminchannel.com/find-account-that-sent-emails-from-shared-mailbox-using-powershell/">Find Account That Sent Emails From Shared Mailbox using PowerShell</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://thesysadminchannel.com/find-account-that-sent-emails-from-shared-mailbox-using-powershell/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4678</post-id>	</item>
		<item>
		<title>Exchange Online Certificate Based Authentication</title>
		<link>https://thesysadminchannel.com/exchange-online-certificate-based-authentication/</link>
					<comments>https://thesysadminchannel.com/exchange-online-certificate-based-authentication/#comments</comments>
		
		<dc:creator><![CDATA[Paul Contreras]]></dc:creator>
		<pubDate>Sun, 06 Nov 2022 19:38:40 +0000</pubDate>
				<category><![CDATA[Exchange Online]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[app-only authentication exchange online]]></category>
		<category><![CDATA[azure app registration certificate authentication]]></category>
		<category><![CDATA[certificate-based authentication for exchange online remote powershell]]></category>
		<category><![CDATA[Connect to Exchange Online Certificate Based Authentication]]></category>
		<category><![CDATA[connect-exchange online certificate thumbprint]]></category>
		<category><![CDATA[exchange certificate based authentication]]></category>
		<category><![CDATA[Exchange Online certificate-based authentication]]></category>
		<category><![CDATA[office 365 certificate-based authentication]]></category>
		<category><![CDATA[remote powershell using certificate-based authentication]]></category>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=4477</guid>

					<description><![CDATA[<p>As a Systems Engineer I am constantly looking for ways to improve processes as well as look for ways to automate everything I possibly can. As a general rule of thumb, I try to automate myself out of a job&#8230; <a href="https://thesysadminchannel.com/exchange-online-certificate-based-authentication/" class="more-link">Continue Reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://thesysadminchannel.com/exchange-online-certificate-based-authentication/">Exchange Online Certificate Based Authentication</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>As a Systems Engineer I am constantly looking for ways to improve processes as well as look for ways to automate everything I possibly can.  As a general rule of thumb, I try to automate myself out of a job so everything can run silky smooth should I ever get hit by a bus.  Since I work primary in Microsoft 365 and Azure AD, I thought it would be great to share what I&#8217;ve learned in order to use that automation for Exchange Online. With that said, this article is going to be geared around <strong>Exchange Online Certificate Based Authentication</strong> and the steps to go 100% Passwordless.</p>
<div id="tableofcontents">
<h2>Table Of Contents</h2>
<ul>
<li><a href="#requirements">Requirements</a></li>
<li><a href="#createcertificate">Create a Self-Signed Certificate</a></li>
<li><a href="#appregistration">Create an Azure App Registration and Service Principal</a></li>
<li><a href="#addexchangerole">Add Exchange Administrator Role</a></li>
<li><a href="#connecttoapp">Connect to Exchange Online using the Azure Application</a></li>
<li><a href="#conclusion">Conclusion</a></li>
</ul>
</div>
<div id="requirements" style="scroll-margin-top: 15px;"></div>
<h2>Requirements</h2>
<p>In order to set this up without failure, there are a few things needed to get you on your way to using Exchange Online certificate based authentication.  Let&#8217;s cover what&#8217;s needed right now.<br />
&nbsp;</p>
<ul>
<li>A certificate, either self signed or one issued by PKI</li>
<li>Azure Application Administrator or Global Administrator</li>
<li>Privilege Role Administrator or Global Administrator</li>
<li>Exchange Online Management PowerShell module</li>
</ul>
<p>&nbsp;</p>
<p>Above are the requirements to allow you to connect to Exchange Online using certificates.  I manage Exchange Online using PowerShell so I added that as well.  If you&#8217;re looking for instructions on how to get that installed, check out this article to <a href="https://thesysadminchannel.com/how-to-install-exchange-online-powershell-module/" rel="noopener" target="_blank">install the Exchange Online Management module for PowerShell</a>.</p>
<div id="createcertificate" style="scroll-margin-top: 15px;"></div>
<h2>Create a Self-Signed Certificate</h2>
<p>First things first, I thought it would be best to start off by creating the self-signed certificate to get the ball rolling.  If possible, I would recommend using a certificate issued by a public key infrastructure (PKI). The reason for that is because we know we can trust it, it is inherently more secure, and we can also revoke the cert should the situation call for it. The problem is not every environment has a PKI setup (my lab included).<br />
&nbsp;</p>
<p>As mentioned, we don&#8217;t have a PKI in our environment so we&#8217;ll make due with a self signed certificate. Luckily, Azure does support self signed certs so let&#8217;s get that created within PowerShell.<br />
With PowerShell open, enter in the following:<br />
&nbsp;</p>
<pre class="brush: powershell; title: ; notranslate">
#splatting for human readability
$CertParam = @{
    'KeyAlgorithm'      = 'RSA'
    'KeyLength'         = 2048
    'KeyExportPolicy'   = 'NonExportable'
    'DnsName'           = 'server.thesysadminchannel.com'
    'FriendlyName'      = 'Exchange Online Automation App'
    'CertStoreLocation' = 'Cert:\CurrentUser\My\'
    'NotAfter'          = (Get-Date).AddYears(1)
}
 
#Creating self signed cert with parameters from above.
$Cert = New-SelfSignedCertificate @CertParam
</pre>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2022/11/Self-Signed-Certificate.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2022/11/Self-Signed-Certificate.png" alt="Self Signed Certificate" width="960" height="468" class="aligncenter size-full wp-image-4481" srcset="https://thesysadminchannel.com/wp-content/uploads/2022/11/Self-Signed-Certificate.png?v=1667715233 960w, https://thesysadminchannel.com/wp-content/uploads/2022/11/Self-Signed-Certificate-768x374.png?v=1667715233 768w" sizes="(max-width: 960px) 100vw, 960px" /></a><br />
&nbsp;</p>
<p>The above parameters do not allow you to export the certificate to another machine.  I should also note that this is saving the certificate under the user context.  If you want to store the certificate under the local machine context, you will need to run PowerShell as an administrator anytime you to connect.  Allowing it under the local machine certificate store means other administrators on the machine would also be able to connect.  So just be aware.<br />
&nbsp;</p>
<p>Now that we have the cert created, let&#8217;s export it so we can upload it to Azure when we create our application.</p>
<pre class="brush: powershell; title: ; notranslate">
#Since we captured the output to the $Cert variable in our previous step.
#We will use that to specify the cert parameter. 
#The .cer file will exported to the user's desktop.
 
Export-Certificate -Cert $Cert -FilePath $Home\Desktop\ExchangeOnlineAutomation.cer
</pre>
<div id="appregistration" style="scroll-margin-top: 15px;"></div>
<h2>Create an Azure App Registration and Service Principal</h2>
<p>To get started, we need to make sure we have the proper rights to get the application created.  This is where you will need an Azure AD Application administrator (or Global administrator).<br />
&nbsp;</p>
<p>Within Azure AD:</p>
<ul>
<li>Navigate to <strong>App registrations</strong> → <strong>New registration</strong></li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2022/11/New-App-Registration.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2022/11/New-App-Registration.png" alt="New App Registration" width="876" height="395" class="aligncenter size-full wp-image-4478" srcset="https://thesysadminchannel.com/wp-content/uploads/2022/11/New-App-Registration.png?v=1667705064 876w, https://thesysadminchannel.com/wp-content/uploads/2022/11/New-App-Registration-768x346.png?v=1667705064 768w" sizes="(max-width: 876px) 100vw, 876px" /></a><br />
&nbsp;</p>
<ul>
<li>Name your application accordingly.  I&#8217;ve named mine <strong>Exchange Online Automation</strong></li>
<li>Select Accounts in this organizational directory only (Single tenant)</li>
<li>Leave the Redirect URI empty</li>
<li>Click Register to create the app</li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2022/11/Register-new-app.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2022/11/Register-new-app.png" alt="Register new app" width="1238" height="808" class="aligncenter size-full wp-image-4480" srcset="https://thesysadminchannel.com/wp-content/uploads/2022/11/Register-new-app.png?v=1667705806 1238w, https://thesysadminchannel.com/wp-content/uploads/2022/11/Register-new-app-1024x668.png?v=1667705806 1024w, https://thesysadminchannel.com/wp-content/uploads/2022/11/Register-new-app-768x501.png?v=1667705806 768w" sizes="(max-width: 1238px) 100vw, 1238px" /></a><br />
&nbsp;</p>
<p>With your app now created:</p>
<ul>
<li>Navigate to Certificates &#038; secrets</li>
<li>Click the certificates tab</li>
<li>Click Upload certificate</li>
<li>Click the folder icon and browse to your desktop to select the exported cert</li>
<li>Click Add</li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2022/11/Upload-Certificate-to-Azure-App.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2022/11/Upload-Certificate-to-Azure-App.png" alt="Upload Certificate to Azure App" width="1475" height="833" class="aligncenter size-full wp-image-4484" srcset="https://thesysadminchannel.com/wp-content/uploads/2022/11/Upload-Certificate-to-Azure-App.png?v=1667717494 1475w, https://thesysadminchannel.com/wp-content/uploads/2022/11/Upload-Certificate-to-Azure-App-1024x578.png?v=1667717494 1024w, https://thesysadminchannel.com/wp-content/uploads/2022/11/Upload-Certificate-to-Azure-App-768x434.png?v=1667717494 768w" sizes="(max-width: 1475px) 100vw, 1475px" /></a></p>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2022/11/Certificate-Setting-for-Azure-App.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2022/11/Certificate-Setting-for-Azure-App.png" alt="Certificate Setting for Azure App" width="854" height="238" class="aligncenter size-full wp-image-4485" srcset="https://thesysadminchannel.com/wp-content/uploads/2022/11/Certificate-Setting-for-Azure-App.png?v=1667717853 854w, https://thesysadminchannel.com/wp-content/uploads/2022/11/Certificate-Setting-for-Azure-App-768x214.png?v=1667717853 768w" sizes="(max-width: 854px) 100vw, 854px" /></a><br />
&nbsp;</p>
<p>Next we need to add the <code>Exchange.ManageAsApp</code> API permissions within the app so the application object can access the resource.  To do this we need to add it through the manifest because we won&#8217;t be able to find it via the typical API permissions blade.<br />
&nbsp;</p>
<p>Within the app, navigate to the manifest blade and replace the <code>requiredResourceAccess</code> block with this code. Be sure to click save when it&#8217;s added.</p>
<pre class="brush: powershell; title: ; notranslate">
&quot;requiredResourceAccess&quot;: [
   {
      &quot;resourceAppId&quot;: &quot;00000002-0000-0ff1-ce00-000000000000&quot;,
      &quot;resourceAccess&quot;: [
         {
            &quot;id&quot;: &quot;dc50a0fb-09a3-484d-be87-e023b12c6440&quot;,
            &quot;type&quot;: &quot;Role&quot;
         }
      ]
   }
],
</pre>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2022/11/App-role-via-App-manifest.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2022/11/App-role-via-App-manifest.png" alt="App role via App manifest" width="1473" height="822" class="aligncenter size-full wp-image-4489" srcset="https://thesysadminchannel.com/wp-content/uploads/2022/11/App-role-via-App-manifest.png?v=1667753748 1473w, https://thesysadminchannel.com/wp-content/uploads/2022/11/App-role-via-App-manifest-1024x571.png?v=1667753748 1024w, https://thesysadminchannel.com/wp-content/uploads/2022/11/App-role-via-App-manifest-768x429.png?v=1667753748 768w" sizes="(max-width: 1473px) 100vw, 1473px" /></a><br />
&nbsp;</p>
<p>Once that is saved, we can verify it was added correctly by going back to API permissions.  We will now see that Exchange.ManageAsApp is the only entry there.<br />
<a href="https://thesysadminchannel.com/wp-content/uploads/2022/11/Admin-consent-to-Exchange-ManageasApp.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2022/11/Admin-consent-to-Exchange-ManageasApp.png" alt="Admin consent to Exchange ManageasApp" width="1469" height="650" class="aligncenter size-full wp-image-4492" srcset="https://thesysadminchannel.com/wp-content/uploads/2022/11/Admin-consent-to-Exchange-ManageasApp.png?v=1667754688 1469w, https://thesysadminchannel.com/wp-content/uploads/2022/11/Admin-consent-to-Exchange-ManageasApp-1024x453.png?v=1667754688 1024w, https://thesysadminchannel.com/wp-content/uploads/2022/11/Admin-consent-to-Exchange-ManageasApp-768x340.png?v=1667754688 768w" sizes="(max-width: 1469px) 100vw, 1469px" /></a><br />
&nbsp;</p>
<p>However, we will notice that the app requires admin consent in order for it to be effective.  Go ahead and consent to it now.  Once complete, it should look like the image below.<br />
<a href="https://thesysadminchannel.com/wp-content/uploads/2022/11/admin-consent-has-been-granted.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2022/11/admin-consent-has-been-granted.png" alt="admin consent has been granted" width="1081" height="195" class="aligncenter size-full wp-image-4493" srcset="https://thesysadminchannel.com/wp-content/uploads/2022/11/admin-consent-has-been-granted.png?v=1667754902 1081w, https://thesysadminchannel.com/wp-content/uploads/2022/11/admin-consent-has-been-granted-1024x185.png?v=1667754902 1024w, https://thesysadminchannel.com/wp-content/uploads/2022/11/admin-consent-has-been-granted-768x139.png?v=1667754902 768w" sizes="(max-width: 1081px) 100vw, 1081px" /></a></p>
<div id="addexchangerole" style="scroll-margin-top: 15px;"></div>
<h2>Add Exchange Administrator Role</h2>
<p>With our app now created and configured properly, we&#8217;ll need to grant the Exchange Administrator role to that app.<br />
&nbsp;</p>
<p>Within Azure AD:</p>
<ul>
<li>Navigate to Roles and administrators</li>
<li>Search for Exchange and click on Exchange administrator</li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2022/11/Exchange-Admin-role.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2022/11/Exchange-Admin-role.png" alt="Exchange Admin role" width="1459" height="664" class="aligncenter size-full wp-image-4494" srcset="https://thesysadminchannel.com/wp-content/uploads/2022/11/Exchange-Admin-role.png?v=1667755387 1459w, https://thesysadminchannel.com/wp-content/uploads/2022/11/Exchange-Admin-role-1024x466.png?v=1667755387 1024w, https://thesysadminchannel.com/wp-content/uploads/2022/11/Exchange-Admin-role-768x350.png?v=1667755387 768w" sizes="(max-width: 1459px) 100vw, 1459px" /></a><br />
&nbsp;</p>
<ul>
<li>You should be taken to the <strong>active assignments</strong> for the Exchange admin role</li>
<li>Click on <strong>Add assignments</strong></li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2022/11/add-assignments.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2022/11/add-assignments.png" alt="add assignments Azure AD role" width="860" height="284" class="aligncenter size-full wp-image-4495" srcset="https://thesysadminchannel.com/wp-content/uploads/2022/11/add-assignments.png?v=1667755615 860w, https://thesysadminchannel.com/wp-content/uploads/2022/11/add-assignments-768x254.png?v=1667755615 768w" sizes="(max-width: 860px) 100vw, 860px" /></a><br />
&nbsp;</p>
<ul>
<li>Click <strong>no members selected</strong> link</li>
<li>Search for the app name (Our is <strong>Exchange Online Automation</strong>)</li>
<li>Click on the app to add it to the selection</li>
<li>Click select</li>
<li>Complete the prompts to add the role</li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2022/11/Add-Exchange-Role-to-Azure-App-1.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2022/11/Add-Exchange-Role-to-Azure-App-1.png" alt="Add Exchange Role to Azure App-1" width="1457" height="803" class="aligncenter size-full wp-image-4500" srcset="https://thesysadminchannel.com/wp-content/uploads/2022/11/Add-Exchange-Role-to-Azure-App-1.png?v=1667759998 1457w, https://thesysadminchannel.com/wp-content/uploads/2022/11/Add-Exchange-Role-to-Azure-App-1-1024x564.png?v=1667759998 1024w, https://thesysadminchannel.com/wp-content/uploads/2022/11/Add-Exchange-Role-to-Azure-App-1-768x423.png?v=1667759998 768w" sizes="(max-width: 1457px) 100vw, 1457px" /></a><br />
&nbsp;</p>
<p>We should now see our Service Principal listed as an active assignment.<br />
<a href="https://thesysadminchannel.com/wp-content/uploads/2022/11/Exchange-App-added-as-an-active-assignment.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2022/11/Exchange-App-added-as-an-active-assignment.png" alt="Exchange App added as an active assignment" width="959" height="326" class="aligncenter size-full wp-image-4497" srcset="https://thesysadminchannel.com/wp-content/uploads/2022/11/Exchange-App-added-as-an-active-assignment.png?v=1667756322 959w, https://thesysadminchannel.com/wp-content/uploads/2022/11/Exchange-App-added-as-an-active-assignment-768x261.png?v=1667756322 768w" sizes="(max-width: 959px) 100vw, 959px" /></a></p>
<div id="blockquote1">
<strong>Note</strong>: I chose to add this as an active assignment with application permissions because this is intended to be used for unattended automation.
</div>
<div id="connecttoapp" style="scroll-margin-top: 15px;"></div>
<h2>Connect to Exchange Online using the Azure Application</h2>
<p>Finally, we&#8217;re in a spot where we can put all of the pieces together and connect to Exchange Online using our Azure AD application (Service Principal).  Again, since I use PowerShell to manage EXO, we&#8217;re going to connect using the Exchange Online Management module.  Be sure to use the latest version.<br />
&nbsp;</p>
<p>Before we connect, let&#8217;s get the AppId.  We&#8217;ll also need to know the tenant&#8217;s default onmicrosoft name.  To get the AppId, go back to the overview page of the Application we created earlier.<br />
<a href="https://thesysadminchannel.com/wp-content/uploads/2022/11/Get-AppId-for-the-app.jpg" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2022/11/Get-AppId-for-the-app.jpg" alt="Get AppId for the app" width="844" height="396" class="aligncenter size-full wp-image-4498" srcset="https://thesysadminchannel.com/wp-content/uploads/2022/11/Get-AppId-for-the-app.jpg?v=1667757870 844w, https://thesysadminchannel.com/wp-content/uploads/2022/11/Get-AppId-for-the-app-768x360.jpg?v=1667757870 768w" sizes="(max-width: 844px) 100vw, 844px" /></a><br />
&nbsp;</p>
<pre class="brush: powershell; title: ; notranslate">
$AppId = '9e46ef5x-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
$Certificate = Get-ChildItem Cert:\CurrentUser\My\A94FFE108DCxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
$TenantName = 'thesysadminchannel.onmicrosoft.com'

Connect-ExchangeOnline -AppId $AppId -Certificate $Certificate -Organization $TenantName -ShowBanner: $false
</pre>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2022/11/exchange-online-certificate-based-authentication.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2022/11/exchange-online-certificate-based-authentication.png" alt="exchange online certificate based authentication" width="1146" height="457" class="aligncenter size-full wp-image-4499" srcset="https://thesysadminchannel.com/wp-content/uploads/2022/11/exchange-online-certificate-based-authentication.png?v=1667759790 1146w, https://thesysadminchannel.com/wp-content/uploads/2022/11/exchange-online-certificate-based-authentication-1024x408.png?v=1667759790 1024w, https://thesysadminchannel.com/wp-content/uploads/2022/11/exchange-online-certificate-based-authentication-768x306.png?v=1667759790 768w" sizes="(max-width: 1146px) 100vw, 1146px" /></a><br />
&nbsp;</p>
<p>As you can see, we were able to successfully connect to Exchange Online and run the Get-Mailbox command against my account.  As a side note, I&#8217;ve also chosen to not display the banner by using the <code>ShowBanner: $false</code> parameter in the command.</p>
<div id="conclusion" style="scroll-margin-top: 10px;"></div>
<h2>Conclusion</h2>
<p>Hopefully this article on how to use Exchange Online certificate based authentication was insightful and you were able to implement it in your own organization.  This is used pretty much daily to automate tasks in Exchange and it&#8217;s great that we don&#8217;t have to worry about usernames and passwords.<br />
&nbsp;</p>
<p>If you want more information on creating Azure apps and using Graph API, check out my in-depth article on <a href="https://thesysadminchannel.com/how-to-connect-to-microsoft-graph-api-using-powershell/" rel="noopener" target="_blank">how to Connect To Microsoft Graph API Using PowerShell</a>.</p>
<p>The post <a href="https://thesysadminchannel.com/exchange-online-certificate-based-authentication/">Exchange Online Certificate Based Authentication</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://thesysadminchannel.com/exchange-online-certificate-based-authentication/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4477</post-id>	</item>
		<item>
		<title>Block Users From Sending to External Recipients in Office 365</title>
		<link>https://thesysadminchannel.com/block-users-from-sending-to-external-recipients-in-office-365/</link>
					<comments>https://thesysadminchannel.com/block-users-from-sending-to-external-recipients-in-office-365/#respond</comments>
		
		<dc:creator><![CDATA[Paul Contreras]]></dc:creator>
		<pubDate>Sat, 02 Jul 2022 22:33:05 +0000</pubDate>
				<category><![CDATA[Exchange Online]]></category>
		<category><![CDATA[Block Users From Sending to External Recipients]]></category>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=4267</guid>

					<description><![CDATA[<p>Have you ever wondered if it&#8217;s possible to block users from sending to external recipients in Office 365? If you have, just know that this can be done using Exchange Transport Rules, ETR for short. Today we&#8217;re going to cover&#8230; <a href="https://thesysadminchannel.com/block-users-from-sending-to-external-recipients-in-office-365/" class="more-link">Continue Reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://thesysadminchannel.com/block-users-from-sending-to-external-recipients-in-office-365/">Block Users From Sending to External Recipients in Office 365</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Have you ever wondered if it&#8217;s possible to block users from sending to external recipients in Office 365?  If you have, just know that this can be done using Exchange Transport Rules, ETR for short.  Today we&#8217;re going to cover the steps on how restrict emails to internal users only for a specific set of users or groups.</p>
<div id="tableofcontents">
<h2>Table Of Contents</h2>
<ul>
<li><a href="#requirements">Requirements</a></li>
<li><a href="#blockexternalrecipients">Block Users From Sending to External Recipients</a></li>
<li><a href="#testrule">Testing The Exchange Transport Rule</a></li>
<li><a href="#conclusion">Conclusion</a></li>
</ul>
</div>
<div id="requirements" style="scroll-margin-top: 15px;"></div>
<h2>Requirements</h2>
<p>If this is something we are considering than let&#8217;s take a look at the options we have available to us.  As mentioned, the best (and most practical) way to handle this task is to do so via a transport rule.  Furthermore, let&#8217;s list the requirements here.</p>
<ul>
<li>Exchange Administrator Role</li>
<li>Exchange Online with a valid mail license</li>
</ul>
<p>&nbsp;</p>
<div id="blockexternalrecipients" style="scroll-margin-top: 15px;"></div>
<h2>Block Users From Sending to External Recipients in Office 365</h2>
<p>Regarding use cases, I&#8217;m sure someone somewhere can justify a good reason why we would want to block mail to an external domain like Gmail, yahoo or anyone outside of your domain.  Perhaps they want to prevent someone from leaking information, whatever the reason may be,  we&#8217;ll show you how to get this done.<br />
&nbsp;</p>
<p>First we&#8217;ll want to open a browser of your choice.</p>
<ul>
<li>Navigate to Exchange Admin Center</li>
<li>Expand Mail Flow -> Rules</li>
<ul>
<li>Direct Link: <a href="https://admin.exchange.microsoft.com/#/transportrules" rel="noopener" target="_blank">https://admin.exchange.microsoft.com/#/transportrules</a></li>
</ul>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2022/06/Exchange-Transport-Rule.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2022/06/Exchange-Transport-Rule.png" alt="Exchange Transport Rule" width="966" height="383" class="aligncenter size-full wp-image-4288" srcset="https://thesysadminchannel.com/wp-content/uploads/2022/06/Exchange-Transport-Rule.png?v=1656635890 966w, https://thesysadminchannel.com/wp-content/uploads/2022/06/Exchange-Transport-Rule-768x304.png?v=1656635890 768w" sizes="(max-width: 966px) 100vw, 966px" /></a><br />
&nbsp;</p>
<ul>
<li>Next Click on the &#8220;+&#8221; to create a new rule</li>
<li>Select Create a new rule</li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2022/06/Create-new-transport-rule.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2022/06/Create-new-transport-rule.png" alt="Create new transport rule" width="855" height="465" class="aligncenter size-full wp-image-4290" srcset="https://thesysadminchannel.com/wp-content/uploads/2022/06/Create-new-transport-rule.png?v=1656636125 855w, https://thesysadminchannel.com/wp-content/uploads/2022/06/Create-new-transport-rule-768x418.png?v=1656636125 768w" sizes="(max-width: 855px) 100vw, 855px" /></a><br />
&nbsp;</p>
<ul>
<li>Name the rule <strong>Block Sending to External Domains</strong></li>
<li>Scroll down a bit and click on the <strong>more options</strong> link</li>
<li>Under apply this rule if dropdown, select <strong>the recipient</strong>.. -> is <strong>external/internal</strong> -> select <strong>outside the organization</strong></li>
<li>Click Add Condition</li>
<li>Under the next and statement, select <strong>the sender</strong>.. -> is <strong>a member of this group</strong> -> select <strong>a mail-enabled security group</strong></li>
<ul>
<li>We have the option to choose individual users but it&#8217;s always best to use groups for easier administration</li>
</ul>
<li>Under <strong>do the following</strong> -> select <strong>block this message</strong> -> select <strong>delete the message without notifying anyone</strong></li>
<li>Apply exceptions as needeed</li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2022/07/Transport-Rule.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2022/07/Transport-Rule.png" alt="Transport Rule" width="983" height="613" class="aligncenter size-full wp-image-4295" srcset="https://thesysadminchannel.com/wp-content/uploads/2022/07/Transport-Rule.png?v=1656797306 983w, https://thesysadminchannel.com/wp-content/uploads/2022/07/Transport-Rule-768x479.png?v=1656797306 768w" sizes="(max-width: 983px) 100vw, 983px" /></a><br />
&nbsp;</p>
<div id="testrule" style="scroll-margin-top: 15px;"></div>
<h2>Testing The Exchange Transport Rule</h2>
<p>Now that we have the rule in place, we should be able to test that it&#8217;s actually working.  To do that, we&#8217;ll send an email to both an external domain and to someone in our tenant.<br />
&nbsp;</p>
<p>In this instance, we can run a simple message trace to see the status and the event type.</p>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2022/07/Testing-Transport-Rule.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2022/07/Testing-Transport-Rule.png" alt="Testing Transport Rule" width="968" height="280" class="aligncenter size-full wp-image-4298" srcset="https://thesysadminchannel.com/wp-content/uploads/2022/07/Testing-Transport-Rule.png?v=1656800334 968w, https://thesysadminchannel.com/wp-content/uploads/2022/07/Testing-Transport-Rule-768x222.png?v=1656800334 768w" sizes="(max-width: 968px) 100vw, 968px" /></a></p>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2022/07/Testing-Transport-Rule-Detail.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2022/07/Testing-Transport-Rule-Detail.png" alt="Testing Transport Rule Detail" width="995" height="365" class="aligncenter size-full wp-image-4299" srcset="https://thesysadminchannel.com/wp-content/uploads/2022/07/Testing-Transport-Rule-Detail.png?v=1656800361 995w, https://thesysadminchannel.com/wp-content/uploads/2022/07/Testing-Transport-Rule-Detail-768x282.png?v=1656800361 768w" sizes="(max-width: 995px) 100vw, 995px" /></a></p>
<div id="conclusion" style="scroll-margin-top: 15px;"></div>
<h2>Conclusion</h2>
<p>Hopefully this article was informative and we were able to show you how to block users from sending to external recipients.  We showed you how to create an Exchange Transport Rule as well as confirming that the actual email was being blocked at the Exchange level.<br />
&nbsp;</p>
<p>If you&#8217;re looking to implement something like this, just be sure that you have the right parameters in place.  If this is not configured correctly, you can imagine the mayhem you&#8217;d cause by blocking all outbound emails.<br />
&nbsp;</p>
<p>Finally, if you&#8217;re looking for more articles on Exchange, be sure to check out <a href="https://thesysadminchannel.com/use-conditional-access-to-block-legacy-authentication-in-office-365/" rel="noopener" target="_blank">how to block legacy authentication in Office 365</a></p>
<p>The post <a href="https://thesysadminchannel.com/block-users-from-sending-to-external-recipients-in-office-365/">Block Users From Sending to External Recipients in Office 365</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://thesysadminchannel.com/block-users-from-sending-to-external-recipients-in-office-365/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4267</post-id>	</item>
		<item>
		<title>Enable Plus Addressing in Office 365 Exchange Online</title>
		<link>https://thesysadminchannel.com/enable-plus-addressing-in-office-365-exchange-online/</link>
					<comments>https://thesysadminchannel.com/enable-plus-addressing-in-office-365-exchange-online/#respond</comments>
		
		<dc:creator><![CDATA[Paul Contreras]]></dc:creator>
		<pubDate>Sun, 08 May 2022 17:20:25 +0000</pubDate>
				<category><![CDATA[Exchange Online]]></category>
		<category><![CDATA[Enable Plus Addressing]]></category>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=4146</guid>

					<description><![CDATA[<p>Not too long ago, Microsoft added the capability to enable plus addressing (also known as subaddressing) for Exchange Online environments. This provides several benefits to you and your organization because plus addressing allows you to create dynamic, disposable recipient addresses.&#8230; <a href="https://thesysadminchannel.com/enable-plus-addressing-in-office-365-exchange-online/" class="more-link">Continue Reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://thesysadminchannel.com/enable-plus-addressing-in-office-365-exchange-online/">Enable Plus Addressing in Office 365 Exchange Online</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Not too long ago, Microsoft added the capability to enable plus addressing (also known as subaddressing) for Exchange Online environments. This provides several benefits to you and your organization because plus addressing allows you to create dynamic, disposable recipient addresses.</p>
<div id="tableofcontents">
<h2>Table Of Contents</h2>
<ul>
<li><a href="#requirements">Requirements</a></li>
<li><a href="#whatisit">Plus Addresses &#8211; What is it and why should I use it</a></li>
<li><a href="#enablefromportal">Enable Plus Addressing in the Office 365 Portal</a></li>
<li><a href="#enablefrompowershell">Enable Plus Addressing using PowerShell</a></li>
<li><a href="#conclusion">Conclusion</a></li>
</ul>
</div>
<div id="requirements" style="scroll-margin-top: 15px;"></div>
<h2>Requirements</h2>
<p>As of today, there aren&#8217;t any major requirements other than having an Office 365 tenant and a mailbox in Exchange Online to be able to use this feature.<br />
&nbsp;</p>
<div id="whatisit" style="scroll-margin-top: 15px;"></div>
<h2>Plus Addresses &#8211; What is it and why should I use it</h2>
<p>Before we get into the details of how to enable plus addressing in Office 365 Exchange Online, let&#8217;s take a minute to explain what it is and why it would be beneficial for you to use it.<br />
&nbsp;</p>
<p>For starters, plus addressing is a standard approach for mailboxes to provide dynamic, disposable recipient email addresses.  Furthermore, it should be explicitly mentioned that this is intended for recipient addresses,  not sending addresses.<br />
&nbsp;</p>
<p>As we&#8217;re well aware, the basic format for an SMTP email address is username@domain.com. However, when using plus addressing, the basic format would be username+additionalcharacterstomakethisunique@domain.com.  When using plus addresses, you as sender can specify a any set of characters after the &#8220;+&#8221; and when enabled, Exchange will see that and route the mail to the mailbox that it corresponds to. This is assuming the underlying mailbox is active and functioning properly.<br />
&nbsp;</p>
<p>We&#8217;ve gone over the what, so now let&#8217;s go over the why.  Why would enabling this in your tenant be beneficial to you or your users?<br />
&nbsp;</p>
<p>Essentially, this would be useful to many organizations because it allows you to use &#8220;burner&#8221; addresses that route to your mailbox in the backend.  I&#8217;ve used it on a couple of occasions myself, mainly when testing something using a different address.  However, this can also be useful for users who would like sign up for subscription services and have the ability to identify those quickly.<br />
&nbsp;</p>
<div id="enablefromportal" style="scroll-margin-top: 15px;"></div>
<h2>Enable Plus Addressing in the Office 365 Portal</h2>
<p>We&#8217;ve identified what plus addresses are and how they can might be of service to you and your org.  Now let&#8217;s take a look how to enable plus addressing in the Office 365 Portal.<br />
&nbsp;</p>
<p>Within the Exchange Admin Center:</p>
<ul>
<li>Navigate to Settings -> Mail Flow</li>
<ul>
<li>Direct Link: <a href="https://admin.exchange.microsoft.com/#/settings" rel="noopener" target="_blank">https://admin.exchange.microsoft.com/#/settings</a></li>
</ul>
<li>Ensure <strong>Turn off plus addressing for your organization</strong> is <strong>unchecked</strong></li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2022/05/Enable-Plus-Addressing-in-the-Office-365-Portal.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2022/05/Enable-Plus-Addressing-in-the-Office-365-Portal.png" alt="Enable Plus Addressing in the Office 365 Portal" width="1258" height="725" class="aligncenter size-full wp-image-4210" srcset="https://thesysadminchannel.com/wp-content/uploads/2022/05/Enable-Plus-Addressing-in-the-Office-365-Portal.png 1258w, https://thesysadminchannel.com/wp-content/uploads/2022/05/Enable-Plus-Addressing-in-the-Office-365-Portal-1024x590.png 1024w, https://thesysadminchannel.com/wp-content/uploads/2022/05/Enable-Plus-Addressing-in-the-Office-365-Portal-768x443.png 768w" sizes="(max-width: 1258px) 100vw, 1258px" /></a></p>
<div id="enablefrompowershell" style="scroll-margin-top: 15px;"></div>
<h2>Enable Plus Addressing using PowerShell</h2>
<p>An alternative to the Exchange Admin portal is being able to enable plus addressing using Powershell.  For starters, we&#8217;ll need to <a href="https://thesysadminchannel.com/how-to-install-exchange-online-powershell-module/" rel="noopener" target="_blank">install Exchange Online Powershell Module</a> and connect to it using the Connect-ExchangeOnline cmdlet.<br />
&nbsp;</p>
<p>Once connected, we can run a one-liner to enable this feature for your tenant.</p>
<pre class="brush: powershell; gutter: false; title: ; notranslate">
PS C:\&gt; Connect-ExchangeOnline -ShowBanner: $false
PS C:\&gt;
PS C:\&gt; Set-OrganizationConfig -DisablePlusAddressingInRecipients $false
PS C:\&gt;
</pre>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2022/05/Enable-Plus-Addressing-using-PowerShell.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2022/05/Enable-Plus-Addressing-using-PowerShell.png" alt="Enable Plus Addressing using PowerShell" width="830" height="200" class="aligncenter size-full wp-image-4212" srcset="https://thesysadminchannel.com/wp-content/uploads/2022/05/Enable-Plus-Addressing-using-PowerShell.png 830w, https://thesysadminchannel.com/wp-content/uploads/2022/05/Enable-Plus-Addressing-using-PowerShell-768x185.png 768w" sizes="(max-width: 830px) 100vw, 830px" /></a></p>
<p>&nbsp;</p>
<div id="blockquote1">
Beginning late April 2022, plus addressing is turned on by default in all organizations, so the AllowPlusAddressInRecipients parameter will no longer work. If you need to disable it, you can disable plus addressing by using the DisablePlusAddressInRecipients parameter and setting that to TRUE.
</div>
<p>&nbsp;</p>
<div id="conclusion" style="scroll-margin-top: 15px;"></div>
<h2>Conclusion</h2>
<p>Hopefully this article to show you how to enable plus addressing for Office 365 and Exchange Online was helpful.  Plus addressing is helpful for users who want to create dynamic, disposable recipient addresses.<br />
&nbsp;</p>
<p>If this was helpful, be sure to check out our other <a href="https://thesysadminchannel.com/office365/exchange-online/" rel="noopener" target="_blank">Exchange Online</a> posts.</p>
<p>The post <a href="https://thesysadminchannel.com/enable-plus-addressing-in-office-365-exchange-online/">Enable Plus Addressing in Office 365 Exchange Online</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://thesysadminchannel.com/enable-plus-addressing-in-office-365-exchange-online/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4146</post-id>	</item>
		<item>
		<title>How To Use Message Trace in Office 365 Exchange Online</title>
		<link>https://thesysadminchannel.com/how-to-use-message-trace-in-office-365-exchange-online/</link>
					<comments>https://thesysadminchannel.com/how-to-use-message-trace-in-office-365-exchange-online/#respond</comments>
		
		<dc:creator><![CDATA[Paul Contreras]]></dc:creator>
		<pubDate>Fri, 02 Jul 2021 03:12:02 +0000</pubDate>
				<category><![CDATA[Exchange Online]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[How To Use Message Trace in Office 365 Exchange Online]]></category>
		<category><![CDATA[Use Message Trace]]></category>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=3104</guid>

					<description><![CDATA[<p>As a Sysadmin, you might come across a scenario where someone comes to you and says, so-and-so sent an email but I never received it. Or I sent so-and-so an email and I want to confirm that it was delivered.&#8230; <a href="https://thesysadminchannel.com/how-to-use-message-trace-in-office-365-exchange-online/" class="more-link">Continue Reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://thesysadminchannel.com/how-to-use-message-trace-in-office-365-exchange-online/">How To Use Message Trace in Office 365 Exchange Online</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>As a Sysadmin, you might come across a scenario where someone comes to you and says, so-and-so sent an email but I never received it.  Or I sent so-and-so an email and I want to confirm that it was delivered.  For these types of questions, it&#8217;s best to use Message Trace in Office 365 Exchange Online to get an accurate answer from a systems standpoint.  </p>
<p>There are ways to check in the GUI and ways to check in Powershell way for CLI folks like myself.  We&#8217;ll go over both methods in this article.</p>
<h2>Requirements</h2>
<p>As far as requirements go, we&#8217;ll lay them down here so you can have success when using this immensely useful tool.</p>
<ul>
<li><strong>Global Administrator</strong> -or <strong>Exchange Administrator</strong> Role</li>
<li>Information to query. SenderAddress -or RecipientAddress -or MessageId -or MessageTraceId</li>
</ul>
<h2>How to use Message Trace in Exchange Admin Center (GUI)</h2>
<p>To achieve this, open your favorite browser and navigate to Exchange Online.  There are 2 commonly known portals at this time:</p>
<ul>
<li>Classic Portal Direct Link: <a href="https://outlook.office365.com/ecp/" rel="noopener" target="_blank">https://outlook.office365.com/ecp/</a></li>
<li>Newest Portal Direct Link: <a href="https://admin.exchange.microsoft.com/#/messagetrace" rel="noopener" target="_blank">https://admin.exchange.microsoft.com/#/messagetrace</a></li>
</ul>
<p>&nbsp;<br />
In this example we&#8217;ll use the new portal.</p>
<ul>
<li>Once you&#8217;re in the Message Trace blade, click <strong>start a trace</strong> and a side panel will popup.</li>
<li>Populate the <strong>Sender</strong> and/or <strong>Recipients</strong> you would like to check</li>
<li>Select how many days you would like the search to check.  Anything 10 days or newer, it is immediately accessible. Searches older than 10 days will be sent via email</li>
<li>Select <strong>Summary Report</strong></li>
<li>Click <strong>Search</strong></li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2021/06/StartMessageTrace.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2021/06/StartMessageTrace.png" alt="Start Message Trace Exchange Online" width="1603" height="857" class="aligncenter size-full wp-image-3175" srcset="https://thesysadminchannel.com/wp-content/uploads/2021/06/StartMessageTrace.png?v=1624948153 1603w, https://thesysadminchannel.com/wp-content/uploads/2021/06/StartMessageTrace-1024x547.png?v=1624948153 1024w, https://thesysadminchannel.com/wp-content/uploads/2021/06/StartMessageTrace-768x411.png?v=1624948153 768w, https://thesysadminchannel.com/wp-content/uploads/2021/06/StartMessageTrace-1536x821.png?v=1624948153 1536w" sizes="(max-width: 1603px) 100vw, 1603px" /></a></p>
<p>&nbsp;<br />
Once you get the data back from the message trace, take note of the message status.  In this case, it will show &#8220;The message was delivered to the recipient&#8217;s Inbox folder.&#8221;  In other cases, it will show SPAM or if they have mailbox rules in place the message will show the folder that it was delivered in.  Pretty neat.</p>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2021/06/How-to-Use-Message-Trace-in-Exchange-Online-GUI.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2021/06/How-to-Use-Message-Trace-in-Exchange-Online-GUI.png" alt="How to Use Message Trace in Exchange Online GUI" width="1372" height="776" class="aligncenter size-full wp-image-3178" srcset="https://thesysadminchannel.com/wp-content/uploads/2021/06/How-to-Use-Message-Trace-in-Exchange-Online-GUI.png?v=1624951617 1372w, https://thesysadminchannel.com/wp-content/uploads/2021/06/How-to-Use-Message-Trace-in-Exchange-Online-GUI-1024x579.png?v=1624951617 1024w, https://thesysadminchannel.com/wp-content/uploads/2021/06/How-to-Use-Message-Trace-in-Exchange-Online-GUI-768x434.png?v=1624951617 768w" sizes="(max-width: 1372px) 100vw, 1372px" /></a></p>
<h2>How to use Message Trace in Powershell</h2>
<p>The tool of preference for me will always be Powershell over a GUI because it lends it self to being more scalable. I&#8217;m also in the CLI most of the so it saves time from clicking into multiple windows to get to where I need.</p>
<p>Just like in the GUI, you&#8217;ll need basic information to run proper searches.  Also, one thing to note here is that <strong>Get-MessageTrace</strong> only runs the last 48 hours by default.  If you need to search emails from 2-10 days you&#8217;ll need to use the <strong>-StartDate</strong> and <strong>-EndDate</strong> parameters. Here is an example of how to run the command in Powershell.</p>
<pre class="brush: powershell; title: ; notranslate">
#Get all emails sent to Gabby over the past 10 days.
Get-MessageTrace -RecipientAddress gabby@thesysadminchannel.com -StartDate 6/20/21 -EndDate 6/30/21

</pre>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2021/06/Get-MessageTrace-Example-1.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2021/06/Get-MessageTrace-Example-1.png" alt="Get-MessageTrace Example 1" width="1194" height="326" class="aligncenter size-full wp-image-3184" srcset="https://thesysadminchannel.com/wp-content/uploads/2021/06/Get-MessageTrace-Example-1.png?v=1625020559 1194w, https://thesysadminchannel.com/wp-content/uploads/2021/06/Get-MessageTrace-Example-1-1024x280.png?v=1625020559 1024w, https://thesysadminchannel.com/wp-content/uploads/2021/06/Get-MessageTrace-Example-1-768x210.png?v=1625020559 768w" sizes="(max-width: 1194px) 100vw, 1194px" /></a><br />
&nbsp;</p>
<p>If you want to get additional information from the email you can pipe it to Get-MessageTraceDetail to give you more detail on what&#8217;s going on under the hood.</p>
<pre class="brush: powershell; title: ; notranslate">
#Get the message trace detail sent to Gabby over the past 10 days.
Get-MessageTrace -RecipientAddress gabby@thesysadminchannel.com | Get-MessageTraceDetail

</pre>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2021/06/Get-MessageTrace-Example-2.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2021/06/Get-MessageTrace-Example-2.png" alt="Get-MessageTrace Example 2" width="1172" height="351" class="aligncenter size-full wp-image-3187" srcset="https://thesysadminchannel.com/wp-content/uploads/2021/06/Get-MessageTrace-Example-2.png?v=1625021010 1172w, https://thesysadminchannel.com/wp-content/uploads/2021/06/Get-MessageTrace-Example-2-1024x307.png?v=1625021010 1024w, https://thesysadminchannel.com/wp-content/uploads/2021/06/Get-MessageTrace-Example-2-768x230.png?v=1625021010 768w" sizes="(max-width: 1172px) 100vw, 1172px" /></a><br />
&nbsp;</p>
<h2>Get all the Recipients an Email was Sent to</h2>
<p>Another use case is to determine who are all the recipients an email was sent to. This is actually going to be a 2-step process and we&#8217;ll go over those as well.</p>
<p>First we&#8217;ll need to get the MessageId from one of the recipients, an example is just like the one mentioned above.  For the sake of testing, we&#8217;ll use another email to get the hang of everything.</p>
<pre class="brush: powershell; title: ; notranslate">
#Get the message trace detail sent to Gabby over the past 10 days.
PS C:\&gt; Get-MessageTrace -RecipientAddress gabby@thesysadminchannel.com


Message Trace ID  : ce8277a0-7ff1-4269-e598-08d93cdf3d40
Message ID        : &lt;BYAPR05MB51915F70965A7FE777E0243BA8009@BYAPR05MB5191.namprd05.prod.outlook.com&gt;
Received          : 7/1/2021 10:26:15 PM
Sender Address    : testmailbox@thesysadminchannel.com
Recipient Address : gabby@thesysadminchannel.com
From IP           : xxx.xxx.xxx.xxx
To IP             :
Subject           : Message Trace Example
Status            : Delivered
Size              : 18619



PS C:\&gt; Get-MessageTrace -MessageId '&lt;BYAPR05MB51915F70965A7FE777E0243BA8009@BYAPR05MB5191.namprd05.prod.outlook.com&gt;' |
 select Received, RecipientAddress, Subject, Status

Received             RecipientAddress                   Subject               Status
--------             ----------------                   -------               ------
7/1/2021 10:26:15 PM pcontreras@thesysadminchannel.com  Message Trace Example Delivered
7/1/2021 10:26:15 PM testmailbox@thesysadminchannel.com Message Trace Example Delivered
7/1/2021 10:26:15 PM gabby@thesysadminchannel.com       Message Trace Example Delivered

</pre>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2021/07/Use-Message-Trace-in-Office-365-Exchange-Online.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2021/07/Use-Message-Trace-in-Office-365-Exchange-Online.png" alt="Use Message Trace in Office 365 Exchange Online" width="1099" height="632" class="aligncenter size-full wp-image-3205" srcset="https://thesysadminchannel.com/wp-content/uploads/2021/07/Use-Message-Trace-in-Office-365-Exchange-Online.png?v=1625245276 1099w, https://thesysadminchannel.com/wp-content/uploads/2021/07/Use-Message-Trace-in-Office-365-Exchange-Online-1024x589.png?v=1625245276 1024w, https://thesysadminchannel.com/wp-content/uploads/2021/07/Use-Message-Trace-in-Office-365-Exchange-Online-768x442.png?v=1625245276 768w" sizes="(max-width: 1099px) 100vw, 1099px" /></a></p>
<h2>Conclusion</h2>
<p>Hopefully this article was useful enough to show you how to use Message Trace in Office 365 Exchange Online to give you some insight on how to confirm receipt of a message.  It also allows you to see how an email was sent to by using the MessageId.  </p>
<p>If you want to view more content be sure to check out <a href="https://thesysadminchannel.com/office365/exchange-online/" rel="noopener" target="_blank">Exchange Online</a>.  If you prefer video content, check out our <a href="https://www.youtube.com/c/theSysadminChannel" rel="noopener" target="_blank">Youtube Page</a>.</p>
<p>The post <a href="https://thesysadminchannel.com/how-to-use-message-trace-in-office-365-exchange-online/">How To Use Message Trace in Office 365 Exchange Online</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://thesysadminchannel.com/how-to-use-message-trace-in-office-365-exchange-online/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3104</post-id>	</item>
		<item>
		<title>How To Block Legacy Authentication Office 365</title>
		<link>https://thesysadminchannel.com/use-conditional-access-to-block-legacy-authentication-in-office-365/</link>
					<comments>https://thesysadminchannel.com/use-conditional-access-to-block-legacy-authentication-in-office-365/#comments</comments>
		
		<dc:creator><![CDATA[Paul Contreras]]></dc:creator>
		<pubDate>Mon, 31 May 2021 03:51:45 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[Exchange Online]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[block legacy authentication exchange activesync legacy authentication]]></category>
		<category><![CDATA[block legacy authentication sharepoint online]]></category>
		<category><![CDATA[microsoft legacy authentication end of life]]></category>
		<category><![CDATA[New-AuthenticationPolicy]]></category>
		<category><![CDATA[office 365 legacy authentication report]]></category>
		<category><![CDATA[sharepoint online legacy authentication]]></category>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=1927</guid>

					<description><![CDATA[<p>Microsoft recently announced that on October 1, 2022 they are going to disable legacy authentication (basic auth) for all M365 tenants. With everything now moving to Modern Authentication and Microsoft Authentication Library (MSAL), previously Active Directory Authentication Library (ADAL) we&#8230; <a href="https://thesysadminchannel.com/use-conditional-access-to-block-legacy-authentication-in-office-365/" class="more-link">Continue Reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://thesysadminchannel.com/use-conditional-access-to-block-legacy-authentication-in-office-365/">How To Block Legacy Authentication Office 365</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Microsoft recently announced that on October 1, 2022 they are going to disable legacy authentication (basic auth) for all M365 tenants. With everything now moving to Modern Authentication and Microsoft Authentication Library (MSAL), previously Active Directory Authentication Library (ADAL) we should know how to disable those old authentication methods. Today, we&#8217;re actually going to cover the step by step methods to <strong>block legacy authentication Office 365</strong>. </p>
<div id="tableofcontents">
<h2>Table Of Contents</h2>
<ul>
<li><a href="#WhatisLegacyAuth">What is Legacy Authentication And Why We Should Block It</a></li>
<li><a href="#CurrentAuthSettings">How To See If Legacy Authentication Is Blocked in your Tenant</a></li>
<li><a href="#ConditionalAccessPolicy">Use Conditional Access To Block Legacy Authentication In Office 365</a></li>
<li><a href="#BlockLegacyAuthExchangeOnline">Block Legacy Authentication Exchange Online</a></li>
<ul>
<li><a href="#CreateLegacyAuthPolicy">Create an Authentication Policy to Disable Basic Authentication</a></li>
<li><a href="#DisableProtocols">Disable IMAP/POP/Mapi/SMTPAuth protocols per mailbox</a></li>
</ul>
<li><a href="#Conclusion">Conclusion</a></li>
</ul>
</div>
<p>&nbsp;</p>
<div id="WhatisLegacyAuth" style="scroll-margin-top: 15px;"></div>
<h2>What is Legacy Authentication And Why We Should Block It</h2>
<p>I suppose before we go into detail on how to block it, we should probably address what it is.  Legacy authentication is more or less self explanatory.  By that I mean, it includes authentication methods that are superseded by todays modern authentication.  In short, legacy authentication are authentication methods typically used by mail protocols such as IMAP, SMTP and POP3.  Microsoft Office 2010 is an example client that uses legacy authentication.</p>
<p>&nbsp;<br />
The biggest take away here is that legacy authentication was highly active during a time where multi-factor authentication wasn&#8217;t really a thing. We&#8217;ve come a long way as far as security and auth methods go, but should still close those gaps because it can lead to open vulnerabilities in your environment.</p>
<p>&nbsp;<br />
<strong>To summarize, legacy authentication does not enforce multi-factor authentication (MFA)</strong> so it gives attackers a preferred attack vector to exploit.  This is the biggest reason <strong>why we want to block legacy authentication</strong>.  With that said, we can now get into the modern (and preferred) methods to blocking legacy authentication using conditional access policies.</p>
<p>&nbsp;</p>
<div id="CurrentAuthSettings" style="scroll-margin-top: 15px;"></div>
<h2>How To See If Legacy Authentication Is Blocked in your Tenant</h2>
<p>Now before you go through your testing it might be a good idea to check whether basic authentication is blocked in your tenant to begin with.  Microsoft has already stated that if they don&#8217;t see any authentication requests using these older protocols, they&#8217;re going to disable it by default.  In my tenant I wasn&#8217;t using so it was actually already turned off.  To save you the headache, here are the steps to check if basic authentication is enabled in your tenant.</p>
<ul>
<li>Navigate to <a href="https://admin.microsoft.com/" rel="noopener" target="_blank">https://admin.microsoft.com/</a> to get to the Office 365 admin portal</li>
<li>Next navigate to <strong>settings</strong> -> <strong>Org Settings</strong> -> <strong>Services</strong> -> <strong>Modern Authentication</strong></li>
<ul>
<li>Direct Link: <a href="https://admin.microsoft.com/AdminPortal/Home#/Settings/Services/:/Settings/L1/ModernAuthentication" rel="noopener" target="_blank">https://admin.microsoft.com/AdminPortal/Home#/Settings/Services/:/Settings/L1/ModernAuthentication</a></li>
</ul>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2021/05/Office-365-Org-Settings.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2021/05/Office-365-Org-Settings.png" alt="Office 365 Org Settings" width="1761" height="748" class="aligncenter size-full wp-image-3467" srcset="https://thesysadminchannel.com/wp-content/uploads/2021/05/Office-365-Org-Settings.png?v=1632729485 1761w, https://thesysadminchannel.com/wp-content/uploads/2021/05/Office-365-Org-Settings-1024x435.png?v=1632729485 1024w, https://thesysadminchannel.com/wp-content/uploads/2021/05/Office-365-Org-Settings-768x326.png?v=1632729485 768w, https://thesysadminchannel.com/wp-content/uploads/2021/05/Office-365-Org-Settings-1536x652.png?v=1632729485 1536w" sizes="(max-width: 1761px) 100vw, 1761px" /></a></p>
<p>&nbsp;</p>
<div id="ConditionalAccessPolicy" style="scroll-margin-top: 15px;"></div>
<h2>Use Conditional Access To Block Legacy Authentication In Office 365</h2>
<p>Now that we understand the why, let&#8217;s get into the how portion of this article.  We&#8217;re going to assume you have permissions to create conditional access policies. </p>
<ul>
<li>In Azure, navigate to <strong>Azure Active Directory</strong> -> <strong>Security</strong> -> <strong>Conditional Access</strong> -> Create a <strong>New Policy</strong></li>
<li>Direct Link: <a href="https://portal.azure.com/#blade/Microsoft_AAD_IAM/ConditionalAccessBlade/Policies" rel="noopener" target="_blank">https://portal.azure.com/#blade/Microsoft_AAD_IAM/ConditionalAccessBlade/Policies</a></li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2021/05/CA-Policy-Legacy-Auth.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2021/05/CA-Policy-Legacy-Auth.png" alt="CA Policy Legacy Auth" width="1247" height="686" class="aligncenter size-full wp-image-3118" srcset="https://thesysadminchannel.com/wp-content/uploads/2021/05/CA-Policy-Legacy-Auth.png?v=1622426763 1247w, https://thesysadminchannel.com/wp-content/uploads/2021/05/CA-Policy-Legacy-Auth-1024x563.png?v=1622426763 1024w, https://thesysadminchannel.com/wp-content/uploads/2021/05/CA-Policy-Legacy-Auth-768x422.png?v=1622426763 768w" sizes="(max-width: 1247px) 100vw, 1247px" /></a><br />
&nbsp;</p>
<ul>
<li>We&#8217;ll name this policy, <strong>Common Policy &#8211; Block Legacy Authentication</strong></li>
<li><strong>Under Users and groups</strong>:</li>
<ul>
<li>Under <strong>Include</strong>: We&#8217;ll select <strong>all users</strong></li>
<li>Under <strong>Exclude</strong>: We&#8217;ll want to <strong>exclude our exclusions group</strong> &#8211; e.g. break glass/service accounts</li>
</ul>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2021/05/Legacy-Auth-User-Assignment.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2021/05/Legacy-Auth-User-Assignment.png" alt="Legacy Auth User Assignment" width="991" height="447" class="aligncenter size-full wp-image-3123" srcset="https://thesysadminchannel.com/wp-content/uploads/2021/05/Legacy-Auth-User-Assignment.png?v=1622427972 991w, https://thesysadminchannel.com/wp-content/uploads/2021/05/Legacy-Auth-User-Assignment-768x346.png?v=1622427972 768w" sizes="(max-width: 991px) 100vw, 991px" /></a></p>
<p>&nbsp;</p>
<ul>
<li><strong>Cloud apps or actions</strong>:</li>
<ul>
<li>Under <strong>Include</strong>: We&#8217;ll select <strong>all cloud apps</strong></li>
<li>Under <strong>Exclude</strong>: We&#8217;ll want to <strong>leave this blank</strong></li>
</ul>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2021/05/Cloud-App-Assignment.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2021/05/Cloud-App-Assignment.png" alt="Cloud App Assignment" width="915" height="470" class="aligncenter size-full wp-image-3125" srcset="https://thesysadminchannel.com/wp-content/uploads/2021/05/Cloud-App-Assignment.png?v=1622429191 915w, https://thesysadminchannel.com/wp-content/uploads/2021/05/Cloud-App-Assignment-768x394.png?v=1622429191 768w" sizes="(max-width: 915px) 100vw, 915px" /></a></p>
<p>&nbsp;</p>
<ul>
<li><strong>Conditions</strong> -> <strong>Client apps</strong>:</li>
<ul>
<li>Select &#8220;Yes&#8221; to configure policy</li>
<li>Unselect Browser and Mobile apps and desktop clients</li>
<li>Leave <strong>Exchange ActiveSync clients</strong> checked</li>
<li>Leave <strong>Other clients</strong> checked</li>
</ul>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2021/05/Conditions-in-CA-Policy.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2021/05/Conditions-in-CA-Policy.png" alt="Conditions in CA Policy" width="956" height="677" class="aligncenter size-full wp-image-3126" srcset="https://thesysadminchannel.com/wp-content/uploads/2021/05/Conditions-in-CA-Policy.png?v=1622429607 956w, https://thesysadminchannel.com/wp-content/uploads/2021/05/Conditions-in-CA-Policy-768x544.png?v=1622429607 768w" sizes="(max-width: 956px) 100vw, 956px" /></a></p>
<p>&nbsp;</p>
<ul>
<li><strong>Grant</strong>:</li>
<ul>
<li>Select <strong>Block Access</strong></li>
</ul>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2021/05/Block-Access-Azure-AD-Conditional-Access-blade.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2021/05/Block-Access-Azure-AD-Conditional-Access-blade.png" alt="Block Access Azure AD Conditional Access blade" width="1071" height="702" class="aligncenter size-full wp-image-3129" srcset="https://thesysadminchannel.com/wp-content/uploads/2021/05/Block-Access-Azure-AD-Conditional-Access-blade.png?v=1622430587 1071w, https://thesysadminchannel.com/wp-content/uploads/2021/05/Block-Access-Azure-AD-Conditional-Access-blade-1024x671.png?v=1622430587 1024w, https://thesysadminchannel.com/wp-content/uploads/2021/05/Block-Access-Azure-AD-Conditional-Access-blade-768x503.png?v=1622430587 768w" sizes="(max-width: 1071px) 100vw, 1071px" /></a></p>
<p>&nbsp;</p>
<p>For the final step, <strong>set the policy to Report-only</strong> so you can have some insights before enabling the policy.  This will give you a heads up as to who is still using legacy authentication and at least give them some kind of notice to stop.  Otherwise, if you&#8217;re brave, turn it off and apply the scream test which is also just as effective as finding out who is still using it.</p>
<p>&nbsp;</p>
<div id="BlockLegacyAuthExchangeOnline" style="scroll-margin-top: 15px;"></div>
<h2>Block Legacy Authentication Exchange Online</h2>
<p>In addition to conditional access, we should also consider disabling the legacy auth methods in Exchange Online itself.  There are several ways we can about it and we&#8217;ll cover those methods as well. However, here is a quick overview.</p>
<ul>
<li>Using an Authentication Policy</li>
<ul>
<li>Apply it as the default organization policy</li>
<li>Apply it as a per user policy</li>
</ul>
<li>Disable IMAP/POP/Mapi/SMTPAuth protocols per mailbox</li>
</ul>
<p>&nbsp;</p>
<div id="CreateLegacyAuthPolicy" style="scroll-margin-top: 15px;"></div>
<h3>Create an Authentication Policy to Disable Basic Authentication</h3>
<p>Being able to create an authentication policy would be able to help you not only identify who is using the policy, but set a standard for your setup.  The command to create an auth policy is <strong>New-AuthenticationPolicy</strong>. Let&#8217;s cover two scenarios for enabling and disabling the required protocols.</p>
<pre class="brush: powershell; title: ; notranslate">
#Create a Block Legacy Authentication Policy
New-AuthenticationPolicy -Name &quot;Block Legacy Authentication&quot;


#Create an Allow All Legacy Authentication Policy
New-AuthenticationPolicy -Name &quot;Allow All Legacy Authentication&quot; -AllowBasicAuthRpc -AllowBasicAuthPop -AllowBasicAuthSmtp -AllowBasicAuthMapi -AllowBasicAuthImap -AllowBasicAuthAutodiscover -AllowBasicAuthPowershell -AllowBasicAuthActiveSync -AllowBasicAuthOfflineAddressBook -AllowBasicAuthReportingWebServices -AllowBasicAuthOutlookService -AllowBasicAuthWebServices 

#Set the authentication policy as the default authentication policy for your organization
Set-OrganizationConfig -DefaultAuthenticationPolicy 'Block Legacy Authentication'

#Set the authentication policy on a per user basis
Set-User jsnow -AuthenticationPolicy 'Block Legacy Authentication'

#Have the policy take effect within the next 30 minutes.  By default it can take up to 24 hours.
Set-User -Identity jsnow -STSRefreshTokensValidFrom (Get-Date).ToUniversalTime()
</pre>
<p>&nbsp;</p>
<div id="DisableProtocols" style="scroll-margin-top: 15px;"></div>
<h3>Disable IMAP/POP/Mapi/SMTPAuth protocols per mailbox</h3>
<p>Another alternative to the authentication method is to disable the protocols for each individual mailbox. This can be done using the Set-CASMailbox command for each of the mailboxes you&#8217;d want to disable.  </p>
<pre class="brush: powershell; title: ; notranslate">
PS C:\&gt; Get-CASMailbox blightyear

Name       ActiveSyncEnabled OWAEnabled PopEnabled ImapEnabled MapiEnabled SmtpClientAuthenticationDisabled
----       ----------------- ---------- ---------- ----------- ----------- --------------------------------
blightyear True              True       True       True        True


PS C:\&gt; Set-CASMailbox blightyear -ActiveSyncEnabled: $false -PopEnabled: $false -ImapEnabled: $false -MAPIEnabled: $false
PS C:\&gt;
PS C:\&gt; Get-CASMailbox blightyear

Name       ActiveSyncEnabled OWAEnabled PopEnabled ImapEnabled MapiEnabled SmtpClientAuthenticationDisabled
----       ----------------- ---------- ---------- ----------- ----------- --------------------------------
blightyear False             True       False      False       False

</pre>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2021/05/Set-CASMailbox-Block-Legacy-Auth.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2021/05/Set-CASMailbox-Block-Legacy-Auth.png" alt="Set CASMailbox Block Legacy Auth" width="1099" height="420" class="aligncenter size-full wp-image-3466" srcset="https://thesysadminchannel.com/wp-content/uploads/2021/05/Set-CASMailbox-Block-Legacy-Auth.png?v=1632728845 1099w, https://thesysadminchannel.com/wp-content/uploads/2021/05/Set-CASMailbox-Block-Legacy-Auth-1024x391.png?v=1632728845 1024w, https://thesysadminchannel.com/wp-content/uploads/2021/05/Set-CASMailbox-Block-Legacy-Auth-768x294.png?v=1632728845 768w" sizes="(max-width: 1099px) 100vw, 1099px" /></a></p>
<p>&nbsp;</p>
<div id="Conclusion" style="scroll-margin-top: 15px;"></div>
<h2>Conclusion</h2>
<p>That&#8217;s it.  Now we know how to block legacy authentication using conditional access policies in Azure Active Directory.  For more posts on conditional access or Azure AD in general, be sure to check out our gallery of <a href="https://thesysadminchannel.com/azure/" rel="noopener" target="_blank">Azure Active Directory</a>.</p>
<p>The post <a href="https://thesysadminchannel.com/use-conditional-access-to-block-legacy-authentication-in-office-365/">How To Block Legacy Authentication Office 365</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://thesysadminchannel.com/use-conditional-access-to-block-legacy-authentication-in-office-365/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1927</post-id>	</item>
		<item>
		<title>How To Turn Off Read Receipts in Office 365 Exchange Online</title>
		<link>https://thesysadminchannel.com/how-to-turn-off-read-receipts-in-office-365-exchange-online/</link>
					<comments>https://thesysadminchannel.com/how-to-turn-off-read-receipts-in-office-365-exchange-online/#comments</comments>
		
		<dc:creator><![CDATA[Paul Contreras]]></dc:creator>
		<pubDate>Sat, 20 Feb 2021 21:51:11 +0000</pubDate>
				<category><![CDATA[Exchange Online]]></category>
		<category><![CDATA[Disable Read Receipts]]></category>
		<category><![CDATA[exchange transport rule example]]></category>
		<category><![CDATA[Turn Off Read Receipts]]></category>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=3012</guid>

					<description><![CDATA[<p>I&#8217;m sure some of you have been caught off guard when you accidently send a read receipt to another user. I won&#8217;t lie, it&#8217;s happened to me too. Someone sends an email full of hateraide and wants confirmation that you&#8230; <a href="https://thesysadminchannel.com/how-to-turn-off-read-receipts-in-office-365-exchange-online/" class="more-link">Continue Reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://thesysadminchannel.com/how-to-turn-off-read-receipts-in-office-365-exchange-online/">How To Turn Off Read Receipts in Office 365 Exchange Online</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I&#8217;m sure some of you have been caught off guard when you accidently send a read receipt to another user.  I won&#8217;t lie, it&#8217;s happened to me too.  Someone sends an email full of hateraide and wants confirmation that you opened their email.  Well today we&#8217;re going to focus on the settings to <strong>turn off read receipts in Office 365 Exchange Online</strong>. </p>
<p>To do this we&#8217;re going to need the Exchange Administrator role because the only way to make this possible is by using an Exchange Transport Rule (ETR).  As of the writing of this article, there isn&#8217;t a magical switch on the tenant level so we&#8217;ll get our hands dirty using transport rules.</p>
<h2>Turn Off Read Receipts in Office 365 Exchange Online</h2>
<p>If you&#8217;ve never worked with Exchange Transport Rules you can think of it as a way to customize mail flow through a set of conditions that you choose.  There are many configurations that can be done with transport rules and it&#8217;s pretty versatile so it&#8217;s going to be our tool of choice.</p>
<p>Now that we have a basic understanding of what a transport rule is, let&#8217;s look at how to access it.  More importantly, let&#8217;s dive into the settings needed to turn off read receipts in Office 365 Exchange Online.  One thing to keep in mind that is we&#8217;ll need to create 2 rules for internal users and another one for external users (if that&#8217;s what your plan is).</p>
<p>&nbsp;</p>
<ul>
<li>Open a browser and navigate to <a href="https://admin.microsoft.com/AdminPortal/Home#/homepage" rel="noopener noreferrer" target="_blank">https://portal.office.com</a> -> <strong>Exchange Admin Center</strong></li>
<li>Navigate to <strong>Mail Flow</strong> -> <strong>Rules</strong> -> Create <strong>new rule</strong></li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2021/02/Create-new-transport-rule.png" target="_blank" rel="noopener noreferrer"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2021/02/Create-new-transport-rule.png" alt="Create new transport rule" width="920" height="502" class="aligncenter size-full wp-image-3020" srcset="https://thesysadminchannel.com/wp-content/uploads/2021/02/Create-new-transport-rule.png?v=1613852852 920w, https://thesysadminchannel.com/wp-content/uploads/2021/02/Create-new-transport-rule-768x419.png?v=1613852852 768w" sizes="(max-width: 920px) 100vw, 920px" /></a></p>
<p>&nbsp;</p>
<ul>
<li>Put in a name like Turn Off Read Receipts &#8211; Internal Users</li>
<li>Set the rule to apply if the sender is inside the organization</li>
<li>Add an and condition to select the recipient inside the organization (Set to outside for external users)</li>
<li>Add another condition if the message type is a read receipt</li>
<li>Under Do the following: delete the message without notifying anyone</li>
<li>You can generate an incident report if you would like to be notified when the rule is hit</li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2021/02/Turn-off-read-receipts-transport-rule.png" target="_blank" rel="noopener noreferrer"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2021/02/Turn-off-read-receipts-transport-rule.png" alt="Turn off read receipts transport rule" width="991" height="730" class="aligncenter size-full wp-image-3022" srcset="https://thesysadminchannel.com/wp-content/uploads/2021/02/Turn-off-read-receipts-transport-rule.png?v=1613854621 991w, https://thesysadminchannel.com/wp-content/uploads/2021/02/Turn-off-read-receipts-transport-rule-768x566.png?v=1613854621 768w" sizes="(max-width: 991px) 100vw, 991px" /></a></p>
<p>&nbsp;</p>
<h2>Testing Rule to Disable Read Receipts</h2>
<p>With the rule now created and a couple of minutes have gone by, now would be the best time to test the rule to ensure that it&#8217;s working as expected.  I&#8217;ve created a test mailbox to send a read receipt for our use case.</p>
<p>Because we enabled the option to generate incident reports anytime anyone sends an email with a read receipt we should be notified.<br />
<a href="https://thesysadminchannel.com/wp-content/uploads/2021/02/Read-Receipt-Test.png" target="_blank" rel="noopener noreferrer"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2021/02/Read-Receipt-Test.png" alt="Read Receipt Test" width="663" height="265" class="aligncenter size-full wp-image-3025" /></a></p>
<p>&nbsp;<br />
Several seconds after sending the test email we&#8217;ve received an email from PostMaster with the incident report.  Here&#8217;s what the content of that message looks like.</p>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2021/02/Read-Receipt-Incident-Report.png" target="_blank" rel="noopener noreferrer"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2021/02/Read-Receipt-Incident-Report.png" alt="Read Receipt Incident Report" width="774" height="430" class="aligncenter size-full wp-image-3026" srcset="https://thesysadminchannel.com/wp-content/uploads/2021/02/Read-Receipt-Incident-Report.png?v=1613857351 774w, https://thesysadminchannel.com/wp-content/uploads/2021/02/Read-Receipt-Incident-Report-768x427.png?v=1613857351 768w" sizes="(max-width: 774px) 100vw, 774px" /></a></p>
<p>That&#8217;s it!  This configuration was pretty simple and should be sufficient to disable read receipts in your org.  If you&#8217;re interested in other posts about Exchange Transport Rules, take a look at <a href="https://thesysadminchannel.com/how-to-stop-reply-all-email-chains/" rel="noopener noreferrer" target="_blank">How To Stop Reply All Email Chains</a>.</p>
<p>Finally, if you want more sysadmin content feel free to take a look at our <a href="https://www.youtube.com/c/theSysadminChannel" rel="noopener noreferrer" target="_blank">Youtube Channel</a> for awesome video content.</p>
<p>The post <a href="https://thesysadminchannel.com/how-to-turn-off-read-receipts-in-office-365-exchange-online/">How To Turn Off Read Receipts in Office 365 Exchange Online</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://thesysadminchannel.com/how-to-turn-off-read-receipts-in-office-365-exchange-online/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3012</post-id>	</item>
		<item>
		<title>[Solved] Your Organization Does Not Allow External Forwarding O365</title>
		<link>https://thesysadminchannel.com/solved-your-organization-does-not-allow-external-forwarding-o365/</link>
					<comments>https://thesysadminchannel.com/solved-your-organization-does-not-allow-external-forwarding-o365/#respond</comments>
		
		<dc:creator><![CDATA[Paul Contreras]]></dc:creator>
		<pubDate>Sat, 30 Jan 2021 22:57:14 +0000</pubDate>
				<category><![CDATA[Exchange Online]]></category>
		<category><![CDATA[enable automatic forwarding office 365]]></category>
		<category><![CDATA[Your organization does not allow external forwarding]]></category>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=2886</guid>

					<description><![CDATA[<p>There might be an occasion where you&#8217;ll need to allow someone automatically forward emails to an external user. I tried this not too long ago in my lab and got the error: Remote Server returned &#8216;550 5.7.520 Access denied, Your&#8230; <a href="https://thesysadminchannel.com/solved-your-organization-does-not-allow-external-forwarding-o365/" class="more-link">Continue Reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://thesysadminchannel.com/solved-your-organization-does-not-allow-external-forwarding-o365/">[Solved] Your Organization Does Not Allow External Forwarding O365</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>There might be an occasion where you&#8217;ll need to allow someone automatically forward emails to an external user.  I tried this not too long ago in my lab and got the error:  <strong>Remote Server returned &#8216;550 5.7.520 Access denied, Your organization does not allow external forwarding. Please contact your administrator for further assistance. AS(7555)&#8217;</strong>.</p>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2021/01/Your-organization-does-not-allow-external-forwarding.png" target="_blank" rel="noopener noreferrer"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2021/01/Your-organization-does-not-allow-external-forwarding.png" alt="Your organization does not allow external forwarding" width="983" height="192" class="aligncenter size-full wp-image-2930" srcset="https://thesysadminchannel.com/wp-content/uploads/2021/01/Your-organization-does-not-allow-external-forwarding.png?v=1612040850 983w, https://thesysadminchannel.com/wp-content/uploads/2021/01/Your-organization-does-not-allow-external-forwarding-768x150.png?v=1612040850 768w" sizes="(max-width: 983px) 100vw, 983px" /></a></p>
<p>A good use case for me was that I was trying to automatically forward social media email to a single Gmail account.  Albeit probably not the most efficient, but for me it was exactly what I needed.  Furthermore, during my testing I was wondering why I was not receiving those test emails in my Gmail account and it was only until a received a bounce back that I was able to follow the clues to a so solution.</p>
<h2>Your Organization Does Not Allow External Forwarding O365 Fix</h2>
<p>I absolutely don&#8217;t recommend allowing for the entire tenant, however, if we ever have the need to allow specific users (or groups)  we can definitely make that happen.  Let&#8217;s go over the steps how to make that happen.</p>
<ul>
<li>Navigate to <a href="https://protection.office.com/antispam" rel="noopener noreferrer" target="_blank">https://protection.office.com/antispam</a></li>
<ul>
<li>Manual way is <strong>Security and Compliance</strong> -> <strong>Threat Management</strong> -> <strong>Policy</strong> -> <strong>Anti-spam Settings</strong> (This is constantly changing so link is preferred)</li>
</ul>
<li>We&#8217;ll <strong>Create an outbound policy</strong> so we can apply this policy to a specific user</li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2021/01/Anti-spam-settings-in-security-and-compliance.png" target="_blank" rel="noopener noreferrer"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2021/01/Anti-spam-settings-in-security-and-compliance.png" alt="Anti-spam settings in security and compliance" width="1024" height="460" class="aligncenter size-full wp-image-2933" srcset="https://thesysadminchannel.com/wp-content/uploads/2021/01/Anti-spam-settings-in-security-and-compliance.png?v=1612042262 1024w, https://thesysadminchannel.com/wp-content/uploads/2021/01/Anti-spam-settings-in-security-and-compliance-768x345.png?v=1612042262 768w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></p>
<p>&nbsp;</p>
<ul>
<li>For the Name:  <strong>Enter Allow auto forwarding</strong></li>
<li>For the Description: Enter something descriptive</li>
<li>Expand the <strong>Automatic Forwarding</strong> block</li>
<li>Under <strong>Allow users to automatically forward messages outside the organization</strong>, select <strong>On &#8211; Forwarding is enabled</strong></li>
<li>Expand the <strong>Applied to</strong> block and click <strong>Add a condition</strong></li>
<li>Select <strong>Sender is</strong> and select the user address in the field</li>
<li>Click Save and you&#8217;re set</li>
</ul>
<div id="attachment_2935" style="width: 991px" class="wp-caption aligncenter"><a href="https://thesysadminchannel.com/wp-content/uploads/2021/01/Enable-automatic-forwarding-o365.png" target="_blank" rel="noopener noreferrer"><img decoding="async" aria-describedby="caption-attachment-2935" src="https://thesysadminchannel.com/wp-content/uploads/2021/01/Short-Enable-automatic-forwarding-o365.png" alt="Create outbound spam policy - Enable automatic forwarding o365" width="981" height="1540" max-height="500" overflow="hidden" class="size-full wp-image-2935" /></a><p id="caption-attachment-2935" class="wp-caption-text">Image cropped &#8211; Click to display full length image</p></div>
<p>&nbsp;</p>
<p>Once we save the policy we should be good to automatically forward emails to an external organization.  Although, I&#8217;ll reiterate once again. This is not something that you should be enabling for the entire organization.</p>
<p>Here&#8217;s what the completed policy should look like if you configured it according to the examples above.</p>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2021/01/Allow-autoforwarding-rule-o365.png" target="_blank" rel="noopener noreferrer"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2021/01/Allow-autoforwarding-rule-o365.png" alt="Your organization does not allow external forwarding" width="1203" height="482" class="aligncenter size-full wp-image-2941" srcset="https://thesysadminchannel.com/wp-content/uploads/2021/01/Allow-autoforwarding-rule-o365.png?v=1612044638 1203w, https://thesysadminchannel.com/wp-content/uploads/2021/01/Allow-autoforwarding-rule-o365-1024x410.png?v=1612044638 1024w, https://thesysadminchannel.com/wp-content/uploads/2021/01/Allow-autoforwarding-rule-o365-768x308.png?v=1612044638 768w" sizes="(max-width: 1203px) 100vw, 1203px" /></a></p>
<p>&nbsp;</p>
<p>Hopefully this article was able to guide you to fix the <strong>Your organization does not allow external forwarding</strong> error for Office 365.  If you want more details, here is the <a href="https://docs.microsoft.com/en-us/microsoft-365/security/office-365-security/configure-the-outbound-spam-policy?view=o365-worldwide" rel="noopener noreferrer" target="_blank">Microsoft documentation</a></p>
<p>On another note, if you want to get caught up on similar posts, feel free to check out our <a href="https://thesysadminchannel.com/office365/" rel="noopener noreferrer" target="_blank">Office 365</a> posts.  Finally,  while you&#8217;re at it, don&#8217;t forget to check out our <a href="https://www.youtube.com/c/theSysadminChannel" rel="noopener noreferrer" target="_blank">Youtube Channel</a> for awesome sysadmin video  content.</p>
<p>The post <a href="https://thesysadminchannel.com/solved-your-organization-does-not-allow-external-forwarding-o365/">[Solved] Your Organization Does Not Allow External Forwarding O365</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://thesysadminchannel.com/solved-your-organization-does-not-allow-external-forwarding-o365/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2886</post-id>	</item>
		<item>
		<title>How To Install Exchange Online Powershell Module</title>
		<link>https://thesysadminchannel.com/how-to-install-exchange-online-powershell-module/</link>
					<comments>https://thesysadminchannel.com/how-to-install-exchange-online-powershell-module/#comments</comments>
		
		<dc:creator><![CDATA[Paul Contreras]]></dc:creator>
		<pubDate>Mon, 17 Aug 2020 05:19:18 +0000</pubDate>
				<category><![CDATA[Exchange Online]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Connect-ExchangeOnline]]></category>
		<category><![CDATA[Exchange Online v2 module]]></category>
		<category><![CDATA[Install Exchange Online Powershell Module]]></category>
		<category><![CDATA[Powershell with MFA]]></category>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=2489</guid>

					<description><![CDATA[<p>With the newer release of the Powershell Module for Exchange Online I wanted to take the time to show you folks how to get that installed on your system. Microsoft claims that it is more reliable and faster than its&#8230; <a href="https://thesysadminchannel.com/how-to-install-exchange-online-powershell-module/" class="more-link">Continue Reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://thesysadminchannel.com/how-to-install-exchange-online-powershell-module/">How To Install Exchange Online Powershell Module</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>With the newer release of the Powershell Module for Exchange Online I wanted to take the time to show you folks how to get that installed on your system.  Microsoft claims that it is more reliable and faster than its predecessor so I wanted to drop a quick post to show you <strong>how to install Exchange Online Powershell module</strong>.</p>
<div id="attachment_2509" style="width: 1229px" class="wp-caption aligncenter"><a href="https://thesysadminchannel.com/wp-content/uploads/2020/11/Connect-ExchangeOnline-Powershell-Module.png" target="_blank" rel="noopener noreferrer"><img decoding="async" aria-describedby="caption-attachment-2509" src="https://thesysadminchannel.com/wp-content/uploads/2020/11/Connect-ExchangeOnline-Powershell-Module.png" alt="Connect-ExchangeOnline Powershell Module" width="1219" height="692" class="size-full wp-image-2509" srcset="https://thesysadminchannel.com/wp-content/uploads/2020/11/Connect-ExchangeOnline-Powershell-Module.png?v=1605248807 1219w, https://thesysadminchannel.com/wp-content/uploads/2020/11/Connect-ExchangeOnline-Powershell-Module-1024x581.png?v=1605248807 1024w, https://thesysadminchannel.com/wp-content/uploads/2020/11/Connect-ExchangeOnline-Powershell-Module-768x436.png?v=1605248807 768w" sizes="(max-width: 1219px) 100vw, 1219px" /></a><p id="caption-attachment-2509" class="wp-caption-text">Some new cmdlets are now prefixed with Get-EXO&#8230;</p></div>
<p>The benefit to having this module as opposed to the version 1 module we previously got from the Exchange Admin Center in portal.office.com is that we can install this across everyone&#8217;s profile.  The previous module (using Connect-EXOPSSession) was profile based so if Melissa installed it on her profile, it wouldn&#8217;t carry over to mine and I would have to go through the process myself.  This particularly made it difficult for admins using a shared jumpbox because every new user would need to go through the motions if they wanted the connection.  Pretty lame!</p>
<p>Furthermore, just like its predecessor it also supports MFA so you can ensure your security remains intact.</p>
<h2>Install Exchange Online Powershell Module From PC With Internet Connection</h2>
<ul>
<li>From a computer with an internet connection open PowerShell (preferably as an administrator)</li>
<li>Find-Module -Name ExchangeOnlineManagement</li>
<li>Install-Module -Name ExchangeOnlineManagement -Scope AllUsers</li>
<li>Get-Command -Module ExchangeOnlineManagement</li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2020/11/Install-Module-Exchange-Online-Management.png" target="_blank" rel="noopener noreferrer"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2020/11/Install-Module-Exchange-Online-Management.png" alt="Install-Module Exchange Online Management" width="1326" height="740" class="aligncenter size-full wp-image-2513" srcset="https://thesysadminchannel.com/wp-content/uploads/2020/11/Install-Module-Exchange-Online-Management.png?v=1605250046 1326w, https://thesysadminchannel.com/wp-content/uploads/2020/11/Install-Module-Exchange-Online-Management-1024x571.png?v=1605250046 1024w, https://thesysadminchannel.com/wp-content/uploads/2020/11/Install-Module-Exchange-Online-Management-768x429.png?v=1605250046 768w" sizes="(max-width: 1326px) 100vw, 1326px" /></a></p>
<p>Using the <code>-Scope CurrentUser</code> parameter allows Powershell to install the module without administrator access.</p>
<h2>Offline Installation of Exchange Online Management Module</h2>
<p>If you&#8217;re on a machine that for some reason can&#8217;t connect to the internet, or the PSRepository is blocked, that&#8217;s ok because we&#8217;ll go over the steps to install the module without internet access.</p>
<ul>
<li>Hop on a computer with internet access and open PowerShell (preferably as an administrator)</li>
<li>Find-Module -Name ExchangeOnlineManagement</li>
<li>Save-Module -Name ExchangeOnlineManagement -Path <em>Path</em></li>
<li>Copy the files you downloaded to the offline computer</li>
<li>Move the copied files to <strong>C:\Program Files\WindowsPowerShell\Modules</strong> (requires admin rights)</li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2020/11/Offline-Installation-of-Exchange-Management-Module.png" target="_blank" rel="noopener noreferrer"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2020/11/Offline-Installation-of-Exchange-Management-Module.png" alt="Offline Installation of Exchange Management Module" width="836" height="394" class="aligncenter size-full wp-image-2515" srcset="https://thesysadminchannel.com/wp-content/uploads/2020/11/Offline-Installation-of-Exchange-Management-Module.png?v=1605250597 836w, https://thesysadminchannel.com/wp-content/uploads/2020/11/Offline-Installation-of-Exchange-Management-Module-768x362.png?v=1605250597 768w" sizes="(max-width: 836px) 100vw, 836px" /></a></p>
<p>&nbsp;</p>
<p>At this point you have the module installed and now it&#8217;s a matter connecting to the Exchange Online service.</p>
<pre class="brush: powershell; title: ; notranslate">
Connect-ExchangeOnline -UserPrincipalName upn@domain.com
Get-Mailbox username
</pre>
<p>&nbsp;</p>
<p>As mentioned this was going to be a really quick note to show you how to Install Exchange Online Powershell Module so hopefully this articles explains that.  If you&#8217;re looking what to do with the Powershell or Exchange Online, be sure to check out our own <a href="https://thesysadminchannel.com/powershell/" rel="noopener noreferrer" target="_blank">Powershell gallery</a> full of useful real world scripts, tips and tricks.  If that&#8217;s not something you&#8217;re in the mood for, check out the other <a href="https://thesysadminchannel.com/office365/exchange-online/" rel="noopener noreferrer" target="_blank">Exchange Online articles</a> or even our <a href="https://www.youtube.com/c/theSysadminChannel" rel="noopener noreferrer" target="_blank">Youtube Channel</a> for more fun in the sysadmin sun.</p>
<p>The post <a href="https://thesysadminchannel.com/how-to-install-exchange-online-powershell-module/">How To Install Exchange Online Powershell Module</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://thesysadminchannel.com/how-to-install-exchange-online-powershell-module/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2489</post-id>	</item>
		<item>
		<title>Get Mobile Device Statistics In Exchange Online Using Powershell</title>
		<link>https://thesysadminchannel.com/get-mobile-device-statistics-in-exchange-online-using-powershell/</link>
					<comments>https://thesysadminchannel.com/get-mobile-device-statistics-in-exchange-online-using-powershell/#comments</comments>
		
		<dc:creator><![CDATA[Paul Contreras]]></dc:creator>
		<pubDate>Fri, 07 Aug 2020 06:56:27 +0000</pubDate>
				<category><![CDATA[Exchange Online]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[azure device info]]></category>
		<category><![CDATA[Get Mobile Device Statistics]]></category>
		<category><![CDATA[Office 365 mobile devices]]></category>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=2455</guid>

					<description><![CDATA[<p>Recently I was checking out my Azure tenant to see which mobile devices are currently in play. This reason for this was to see if there were any stale devices that can be deleted or if there were devices of&#8230; <a href="https://thesysadminchannel.com/get-mobile-device-statistics-in-exchange-online-using-powershell/" class="more-link">Continue Reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://thesysadminchannel.com/get-mobile-device-statistics-in-exchange-online-using-powershell/">Get Mobile Device Statistics In Exchange Online Using Powershell</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Recently I was checking out my <a href="https://thesysadminchannel.com/azure/" rel="noopener noreferrer" target="_blank">Azure</a> tenant to see which mobile devices are currently in play.  This reason for this was to see if there were any stale devices that can be deleted or if there were devices of a certain type that I wanted to filter.  For this I would use the <strong>Get-MobileDevice</strong> and <strong>Get-MobileDeviceStatistics</strong> cmdlets to, well&#8230; Get Mobile Device Statistics in Powershell.</p>
<h2>Prerequisites</h2>
<p>One of the prerequisites you&#8217;ll need to in order to make this happen is to <a href="https://thesysadminchannel.com/how-to-install-exchange-online-powershell-module/" rel="noopener noreferrer" target="_blank">install the Exchange Online module</a>.  Luckily it&#8217;s not too difficult if you follow the linked article. Another requirement is the account you&#8217;re using must have the Exchange Administrator role to be able to query Exchange Online.</p>
<p>So in short, here is what you&#8217;ll need.</p>
<ul>
<li><strong>Exchange Online Management</strong> Module</li>
<li><strong>Exchange Administrator</strong> or <strong>Global Administrator</strong> Role</li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2020/11/Exchange-Admin-Role-in-Azure.png" target="_blank" rel="noopener noreferrer"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2020/11/Exchange-Admin-Role-in-Azure.png" alt="Exchange Admin Role in Azure" width="952" height="486" class="aligncenter size-full wp-image-2491" srcset="https://thesysadminchannel.com/wp-content/uploads/2020/11/Exchange-Admin-Role-in-Azure.png?v=1605136313 952w, https://thesysadminchannel.com/wp-content/uploads/2020/11/Exchange-Admin-Role-in-Azure-768x392.png?v=1605136313 768w" sizes="(max-width: 952px) 100vw, 952px" /></a><br />
&nbsp;</p>
<h2>Get Mobile Device Statistics Using Powershell</h2>
<p>Alright now that we know what we need, let&#8217;s look at how to extract that information from Exchange Online.  As mentioned we will be using the Get-MobileDevice cmdlet along with the Get-MobileDeviceStatistics to get the different properties. Get-MobileDevice has a mailbox parameter so we can filter devices that are associated with a mailbox, assuming you only wanted a single user&#8217;s device. Let&#8217;s look at what that looks like in the shell.</p>
<pre class="brush: powershell; title: ; notranslate">
Import-Module ExchangeOnlineManagement
Connect-ExchangeOnline -UserPrincipalName exchangeAdmin@thesysadminchannel.com

Get-MobileDevice -Mailbox pcontreras | select @{Name = 'Identity' ; Expression = {$_.Identity -replace &quot;\\.+&quot;}}, `
DeviceId, IsManaged, IsCompliant, DeviceOS, DeviceType, FriendlyName, `
DeviceUserAgent, FirstSyncTime, DeviceAccessState, DeviceAccessStateReason, ClientType -First 1

Identity                : Paul Contreras
DeviceId                : D1151F256364422E827C79AF3D3B2230
IsManaged               : False
IsCompliant             : False
DeviceOS                : iOS 13.7
DeviceType              : Outlook
FriendlyName            :
DeviceUserAgent         : Outlook-iOS/2.0
FirstSyncTime           : 9/12/2020 2:43:42 AM
DeviceAccessState       : Allowed
DeviceAccessStateReason : ExternallyManaged
ClientType              : Outlook

</pre>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2020/11/Get-MobileDevice-cmdlet-output.png" target="_blank" rel="noopener noreferrer"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2020/11/Get-MobileDevice-cmdlet-output.png" alt="Get-MobileDevice cmdlet output" width="1118" height="492" class="aligncenter size-full wp-image-2495" srcset="https://thesysadminchannel.com/wp-content/uploads/2020/11/Get-MobileDevice-cmdlet-output.png?v=1605138861 1118w, https://thesysadminchannel.com/wp-content/uploads/2020/11/Get-MobileDevice-cmdlet-output-1024x451.png?v=1605138861 1024w, https://thesysadminchannel.com/wp-content/uploads/2020/11/Get-MobileDevice-cmdlet-output-768x338.png?v=1605138861 768w" sizes="(max-width: 1118px) 100vw, 1118px" /></a><br />
&nbsp;</p>
<p>Get Mobile Device Statistics show similar results, however, I do like the fact that it has a <strong>LastSuccessSync</strong> and <strong>LastSyncAttemptTime</strong> to see exactly how long devices have been stale.  If you&#8217;re really good with with regex, you can parse the text in the Identity property to give you just the name.  My regex game is really weak so if you know how to do that, please post it in the comments so other viewers can use it as well.</p>
<h2>Powershell Script To Get Device and Statistics</h2>
<p>Since I like to use these 2 cmdlets interchangeably, I thought it would be helpful to provide a script so you can call the Get-MobileDeviceStatistics using the GUID from Get-MobileDevice output.</p>
<pre class="brush: powershell; title: ; notranslate">
#Get all mobile devices in the org
$MobileDeviceList = Get-MobileDevice

#Alternatively, Get all mobile devices from a single user
$MobileDeviceList = Get-MobileDevice -Mailbox pcontreras@thesysadminchannel.com

foreach ($Device in $MobileDeviceList) {
    $Stats = Get-MobileDeviceStatistics -Identity $Device.Guid.toString()
    [PSCustomObject]@{
        Identity              = $Device.Identity -replace &quot;\\.+&quot;
        DeviceType            = $Device.DeviceType
        DeviceOS              = $Device.DeviceOS
        LastSuccessSync       = $Stats.LastSuccessSync
        LastSyncAttemptTime   = $Stats.LastSyncAttemptTime
        LastPolicyUpdateTime  = $Stats.LastPolicyUpdateTime
        LastPingHeartbeat     = $Stats.LastPingHeartbeat
        ClientType            = $Stats.ClientType
    }
}

Identity             : Paul Contreras
DeviceType           : Outlook
DeviceOS             : iOS 13.7
LastSuccessSync      : 9/12/2020 2:43:43 AM
LastSyncAttemptTime  : 9/12/2020 2:43:43 AM
LastPolicyUpdateTime : 9/12/2020 2:43:43 AM
LastPingHeartbeat    :
ClientType           : Outlook

Identity             : Paul Contreras
DeviceType           : iPhone
DeviceOS             : iOS 14.1 18A8395
LastSuccessSync      : 11/12/2020 2:40:02 AM
LastSyncAttemptTime  : 11/12/2020 2:40:02 AM
LastPolicyUpdateTime : 11/11/2020 6:32:40 PM
LastPingHeartbeat    : 600
ClientType           : EAS

</pre>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2020/11/Get-Mobile-Device-Statistics-Function.png" target="_blank" rel="noopener noreferrer"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2020/11/Get-Mobile-Device-Statistics-Function.png" alt="Get Mobile Device Statistics Function" width="1126" height="640" class="aligncenter size-full wp-image-2504" srcset="https://thesysadminchannel.com/wp-content/uploads/2020/11/Get-Mobile-Device-Statistics-Function.png?v=1605154323 1126w, https://thesysadminchannel.com/wp-content/uploads/2020/11/Get-Mobile-Device-Statistics-Function-1024x582.png?v=1605154323 1024w, https://thesysadminchannel.com/wp-content/uploads/2020/11/Get-Mobile-Device-Statistics-Function-768x437.png?v=1605154323 768w" sizes="(max-width: 1126px) 100vw, 1126px" /></a></p>
<p>&nbsp;</p>
<p>Alright folk,  hopefully this article was useful enough to provide you the information needed to get mobile device statistics using Powershell. Furthermore, I hope it was enough to determine which of those devices are stale and no longer in use.  This is an excellent strategy for when you want to do some spring cleaning.</p>
<p>If you like to see more cloud content, be sure to check out our <a href="https://thesysadminchannel.com/office365/" rel="noopener noreferrer" target="_blank">Office 365 Cloud Category</a> for more useful tips and tricks.  Finally, be sure to stop by our <a href="https://www.youtube.com/c/theSysadminChannel" rel="noopener noreferrer" target="_blank">Youtube Page</a> for those visual learners.</p>
<p>The post <a href="https://thesysadminchannel.com/get-mobile-device-statistics-in-exchange-online-using-powershell/">Get Mobile Device Statistics In Exchange Online Using Powershell</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://thesysadminchannel.com/get-mobile-device-statistics-in-exchange-online-using-powershell/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2455</post-id>	</item>
	</channel>
</rss>
