{"id":314,"date":"2011-08-01T08:00:10","date_gmt":"2011-08-01T07:00:10","guid":{"rendered":"http:\/\/emtunc.org\/blog\/?p=314"},"modified":"2013-06-15T13:12:35","modified_gmt":"2013-06-15T12:12:35","slug":"grant-and-revoke-access-to-mailboxes-office-365","status":"publish","type":"post","link":"https:\/\/emtunc.org\/blog\/08\/2011\/grant-and-revoke-access-to-mailboxes-office-365\/","title":{"rendered":"Grant and Revoke Access to Mailboxes &#8211; Office 365"},"content":{"rendered":"<p>There may be times where you may need to grant an IT administrator or other employees access to another user&#8217;s mailbox.<br \/>\nBelow I will demonstrate how to:<\/p>\n<ul>\n<li>Grant an Admin access to a single mailbox<\/li>\n<li>Grant an Admin access to all mailboxes<\/li>\n<li>Revoke the above permissions (recommended cause of action after the Administrator has finished his\/her tasks)<\/li>\n<\/ul>\n<p><!--more--><\/p>\n<ol>\n<li>First make sure you have the remote signed execution policy set to true. You can do this by running PowerShell in admin mode and running: <strong>Set-ExecutionPolicy RemoteSigned<\/strong><\/li>\n<li>Next, run the following to authenticate your self and import PowerShell commands to your local session:<br \/>\n<code>$LiveCred = Get-Credential<br \/>\n$Session = New-PSSession -ConfigurationName Microsoft.Exchange-ConnectionUri https:\/\/ps.outlook.com\/powershell\/ -Credential $LiveCred -Authentication Basic -AllowRedirection<br \/>\nImport-PSSession $Session<\/code><\/li>\n<\/ol>\n<h2>Grant an Admin access to a single mailbox<\/h2>\n<ul>\n<li><code>Add-MailboxPermission user@domain.com -User admin@domain.com -AccessRights FullAccess -InheritanceType All<\/code><\/li>\n<\/ul>\n<h2>Grant an Admin access to all mailboxes<\/h2>\n<ul>\n<li><code>Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'UserMailbox') -and (Alias -ne 'Admin')} | Add-MailboxPermission -User <strong><code>admin@domain.com<\/code><\/strong> -AccessRights fullaccess -InheritanceType all<\/code><\/li>\n<\/ul>\n<h2>Revoke the above permissions<\/h2>\n<ul>\n<li>If you want to revoke permissions after granting them, simply replace the &#8216;<strong>Add-MailboxPermission<\/strong>&#8216; with &#8216;<strong>Remove-MailboxPermission<\/strong>&#8216; followed by the original command you entered to grant the permissions. For example, to grant admin@example.com full access to user@example.com, you would enter the command:<br \/>\n<code>Add-MailboxPermission <strong>user@example.com<\/strong> -User <strong>admin@example.com<\/strong> -AccessRights FullAccess -InheritanceType All<\/code><\/li>\n<\/ul>\n<ul>\n<li>To revoke admin@example.com from viewing user@example.com, you would enter the command:<br \/>\n<code>Remove-MailboxPermission <strong>user@example.com<\/strong> -User <strong>admin@example.com<\/strong> -AccessRights FullAccess -InheritanceType All<\/code><\/li>\n<\/ul>\n<p><strong>Update:<\/strong> There is a switch you can use in conjunction with the above commands which will hide the user mailboxe from appearing in the mailbox-tree panel in Outlook (on the left side).<\/p>\n<p><code>-AutoMapping $false<\/code><\/p>\n<p>Thanks to Stephen Ford for this tip!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There may be times where you may need to grant an IT administrator or other employees access to another user&#8217;s mailbox. Below I will demonstrate how to: Grant an Admin access to a single mailbox Grant an Admin access to all mailboxes Revoke the above permissions (recommended cause of action after the Administrator has finished [&hellip;]<\/p>\n","protected":false},"author":32,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"categories":[1],"tags":[47,44,46,37,45,42],"class_list":["post-314","post","type-post","status-publish","format-standard","hentry","category-tech","tag-administration","tag-exchange","tag-mailbox","tag-office-365","tag-permissions","tag-powershell"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1trTO-54","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/posts\/314","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/users\/32"}],"replies":[{"embeddable":true,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/comments?post=314"}],"version-history":[{"count":2,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/posts\/314\/revisions"}],"predecessor-version":[{"id":915,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/posts\/314\/revisions\/915"}],"wp:attachment":[{"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/media?parent=314"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/categories?post=314"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/tags?post=314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}