<?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>shared mailbox sendas permission audit Archives - the Sysadmin Channel</title>
	<atom:link href="https://thesysadminchannel.com/tag/shared-mailbox-sendas-permission-audit/feed/" rel="self" type="application/rss+xml" />
	<link>https://thesysadminchannel.com/tag/shared-mailbox-sendas-permission-audit/</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>
	</channel>
</rss>
