{"id":5907,"date":"2025-06-05T13:37:53","date_gmt":"2025-06-05T11:37:53","guid":{"rendered":"https:\/\/www.msb365.blog\/?p=5907"},"modified":"2025-06-06T13:23:06","modified_gmt":"2025-06-06T11:23:06","slug":"set-sendas-and-or-fullaccess-permissions-on-mailboxes","status":"publish","type":"post","link":"https:\/\/www.msb365.blog\/?p=5907","title":{"rendered":"Set &#8220;SendAs&#8221; and\/or &#8220;FullAccess&#8221; permissions on mailboxes"},"content":{"rendered":"<p>Setting \u201cSendAs\u201d and \u201cFullAccess\u201d authorizations is basically old hat.<br \/>\nThere are many blog articles and also many scripts on how this can be done for a large number of mailboxes.<br \/>\nNevertheless, I have taken the time to write such a script, which I would like to share with the community.<\/p>\n<h3>What makes my script different from others?<\/h3>\n<p>Well, I don\u2019t want to judge at this point whether my PowerShell script is better or worse than others.<br \/>\nThe decisive question is which features and functions are expected from a script.<br \/>\nMy script offers the following functions:<\/p>\n<ul>\n<li>Adding and removing \u201cSendAs\u201d permissions<\/li>\n<li>Adding and removing \u201cSendAs\u201d authorizations<\/li>\n<li>HTML report on the adjustments made.<\/li>\n<\/ul>\n<h3>What are the requirements for using this script?<\/h3>\n<p>For this PowerShell script to work properly, there are basically only 2 technical requirements:<\/p>\n<ul>\n<li>The script should be executed with PowerShell 7.<\/li>\n<li>Exchange online PowerShell module must be installed.<\/li>\n<\/ul>\n<p>Other soft requirements are of course the necessary permissions to edit the actions of access rights to Exchange online mailboxes and a CSV file, which should be prepared before executing this script.<\/p>\n<p>\u00a0<\/p>\n<h3>What must this CSV file look like?<\/h3>\n<p>The CSV file requires 4 pieces of information, which should be created as follows:<\/p>\n<table>\n<thead>\n<tr>\n<th align=\"left\">Header<\/th>\n<th align=\"left\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td align=\"left\"><code>MailboxIdentity<\/code><\/td>\n<td align=\"left\">The email address or alias of the mailbox to modify.<\/td>\n<\/tr>\n<tr>\n<td align=\"left\"><code>UserIdentity<\/code><\/td>\n<td align=\"left\">The email address or alias of the user to grant permissions to.<\/td>\n<\/tr>\n<tr>\n<td align=\"left\"><code>SendAs<\/code><\/td>\n<td align=\"left\">Set to\u00a0<code>TRUE<\/code>\u00a0to grant \u201cSend As\u201d permission,\u00a0<code>FALSE<\/code>\u00a0otherwise.<\/td>\n<\/tr>\n<tr>\n<td align=\"left\"><code>FullAccess<\/code><\/td>\n<td align=\"left\">Set to\u00a0<code>TRUE<\/code>\u00a0to grant \u201cFull Access\u201d permission,\u00a0<code>FALSE<\/code>\u00a0otherwise.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>This means that the CSV should look like this:<\/p>\n<pre class=\"notranslate\" lang=\"csv\"><code>MailboxIdentity,UserIdentity,SendAs,FullAccess\r\nshared.mailbox@company.com,john.doe@company.com,TRUE,TRUE\r\nshared.mailbox@company.com,jane.smith@company.com,TRUE,FALSE\r\nshared.mailbox@company.com,admin@company.com,FALSE,TRUE\r\nfinance@company.com,john.doe@company.com,TRUE,TRUE\r\nfinance@company.com,finance.manager@company.com,TRUE,TRUE<\/code><\/pre>\n<p>\u00a0<\/p>\n<p><span style=\"color: #ff0000;\"><strong>IMPORTANT:<\/strong><\/span> If there are other permissions set for the mailbox defined under \u201cMailboxIdentity\u201d that are not included in this CSV, these permissions will be <strong>removed<\/strong> when the script is executed.<br \/>\nWhy? I have also created this script with the intention of cleaning up permissions.<\/p>\n<p>\u00a0<\/p>\n<h3>How does the script behave when it is executed?<\/h3>\n<table>\n<tbody>\n<tr>\n<td width=\"301\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-5916\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/1Screenshot-2025-06-05-130532-1.png\" alt=\"\" width=\"461\" height=\"304\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/1Screenshot-2025-06-05-130532-1.png 461w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/1Screenshot-2025-06-05-130532-1-300x198.png 300w\" sizes=\"(max-width: 461px) 100vw, 461px\" \/><\/td>\n<td width=\"301\">\u00a0<\/p>\n<p>When the script is started and after the license conditions for this script have been accepted, the following dialog box appears, which explains again exactly what this PowerShell script does.<\/p>\n<p>\u00a0<\/td>\n<\/tr>\n<tr>\n<td width=\"301\"><img decoding=\"async\" class=\"alignnone size-full wp-image-5915\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/2Screenshot-2025-06-05-130639.png\" alt=\"\" width=\"889\" height=\"271\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/2Screenshot-2025-06-05-130639.png 889w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/2Screenshot-2025-06-05-130639-300x91.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/2Screenshot-2025-06-05-130639-768x234.png 768w\" sizes=\"(max-width: 889px) 100vw, 889px\" \/><\/td>\n<td width=\"301\">\u00a0<\/p>\n<p>Now another Windows window opens, here we can now select the prepared CSV file.<\/p>\n<p>\u00a0<\/td>\n<\/tr>\n<tr>\n<td width=\"301\"><img decoding=\"async\" class=\"alignnone size-full wp-image-5917\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/3Screenshot-2025-06-05-130737.png\" alt=\"\" width=\"709\" height=\"334\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/3Screenshot-2025-06-05-130737.png 709w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/3Screenshot-2025-06-05-130737-300x141.png 300w\" sizes=\"(max-width: 709px) 100vw, 709px\" \/><\/td>\n<td width=\"301\">\u00a0<\/p>\n<p>The next step is to set up the connection to Exchange online.<\/p>\n<p>\u00a0<\/td>\n<\/tr>\n<tr>\n<td width=\"301\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5918\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/4Screenshot-2025-06-05-130838.png\" alt=\"\" width=\"799\" height=\"486\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/4Screenshot-2025-06-05-130838.png 799w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/4Screenshot-2025-06-05-130838-300x182.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/4Screenshot-2025-06-05-130838-768x467.png 768w\" sizes=\"(max-width: 799px) 100vw, 799px\" \/><\/td>\n<td width=\"301\">\u00a0<\/p>\n<p>If \u201cYes\u201d was clicked in the previous pop-up window, we must now authenticate ourselves with our EntraID data to the Microsoft Teanant.<\/p>\n<p>\u00a0<\/td>\n<\/tr>\n<tr>\n<td width=\"301\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5919\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/5Screenshot-2025-06-05-130907.png\" alt=\"\" width=\"707\" height=\"302\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/5Screenshot-2025-06-05-130907.png 707w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/5Screenshot-2025-06-05-130907-300x128.png 300w\" sizes=\"(max-width: 707px) 100vw, 707px\" \/><\/td>\n<td width=\"301\">\u00a0<\/p>\n<p>If we have successfully logged on to Exchange online, the summary from the CSV file will be displayed again. Please check this and if everything is OK, click on \u201cYes\u201d to continue.<\/p>\n<p>\u00a0<\/td>\n<\/tr>\n<tr>\n<td width=\"301\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-5920\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/6Screenshot-2025-06-05-130942-1024x756.png\" alt=\"\" width=\"1024\" height=\"756\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/6Screenshot-2025-06-05-130942-1024x756.png 1024w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/6Screenshot-2025-06-05-130942-300x222.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/6Screenshot-2025-06-05-130942-768x567.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/6Screenshot-2025-06-05-130942.png 1037w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/td>\n<td width=\"301\">\u00a0<\/p>\n<p>The tasks from the CSV are now processed as specified. Each step is visible in the PowerShell console.<\/p>\n<p>\u00a0<\/p>\n<p>When all tasks have been completed, another pop-up appears asking whether an HTML report should now be created.<\/p>\n<p>\u00a0<\/td>\n<\/tr>\n<tr>\n<td width=\"301\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5921\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/7Screenshot-2025-06-05-131014.png\" alt=\"\" width=\"470\" height=\"327\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/7Screenshot-2025-06-05-131014.png 470w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/7Screenshot-2025-06-05-131014-300x209.png 300w\" sizes=\"(max-width: 470px) 100vw, 470px\" \/><\/td>\n<td width=\"301\">\u00a0<\/p>\n<p>Last but not least, there is an overview of what was actually done when this script was executed and where the HTML report is stored.<\/p>\n<p>\u00a0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Reporting<\/h3>\n<p>After the script has run, an HTML file is created as a report. This HTML report is saved in the same place where we previously selected the CSV file.<br \/>\nBelow is an example of how this HTML report can look.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-5911\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/Screenshot-2025-06-05-130055-984x1024.png\" alt=\"\" width=\"984\" height=\"1024\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/Screenshot-2025-06-05-130055-984x1024.png 984w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/Screenshot-2025-06-05-130055-288x300.png 288w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/Screenshot-2025-06-05-130055-768x800.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2025\/06\/Screenshot-2025-06-05-130055.png 1239w\" sizes=\"(max-width: 984px) 100vw, 984px\" \/><\/p>\n<h3>Get the Script<\/h3>\n<p>As always, although I have tested and used the script several times, I cannot and will not accept any liability for the use of this script.<br \/>\nReaders who download the script are free to customize it according to their needs. Commercial use is allowed, but monetarization requires my explicit permission.<\/p>\n<div class=\"vlp-link-container vlp-layout-basic\"><a href=\"https:\/\/github.com\/MSB365\/MailboxPermissions\/tree\/main\" class=\"vlp-link\" title=\"GitHub - MSB365\/MailboxPermissions\" rel=\"nofollow\" target=\"_blank\"><\/a><div class=\"vlp-layout-zone-side\"><div class=\"vlp-block-2 vlp-link-image\"><img decoding=\"async\" src=\"https:\/\/opengraph.githubassets.com\/c9c9775957f56a65ac50a13ac4185af5a34f48bc48b0f9a4aceb87f70b217e5c\/MSB365\/MailboxPermissions\" style=\"max-width: 150px; max-height: 150px\" \/><\/div><\/div><div class=\"vlp-layout-zone-main\"><div class=\"vlp-block-0 vlp-link-title\">GitHub - MSB365\/MailboxPermissions<\/div><div class=\"vlp-block-1 vlp-link-summary\">Contribute to MSB365\/MailboxPermissions development by creating an account on GitHub.<\/div><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Setting \u201cSendAs\u201d and \u201cFullAccess\u201d authorizations is basically old hat. There are many blog articles and also many scripts on how this can be done for a large number of mailboxes. Nevertheless, I have taken the time to write such a script, which I would like to share with the community. What makes my script different [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5924,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[2,3],"tags":[],"class_list":["post-5907","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-exchange","category-powershell"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/5907","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5907"}],"version-history":[{"count":6,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/5907\/revisions"}],"predecessor-version":[{"id":5922,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/5907\/revisions\/5922"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/media\/5924"}],"wp:attachment":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}