blog.atwork.at

news and infos about microsoft, technology, cloud and more

Adding Send as permissions to an Office 365 Group with PowerShell

Office 365 Groups provide a bunch of useful features for collaboration. In some cases, users want to send emails from an Office 365 group as sender. Here’s the HowTo” to accomplish SendAs” permissions to an Office 365 group for users.

By default, users do not have any permissions to send from an Office 365 Group. So, if you try to send an email with such a sender address, you will get a reply similar as here.

image

The message subject says Undeliverable: msg from a group” and the message text informs about the issue: This message could not be sent. You do not have the permission to send the message on behalf of the specified user.

So, let’s fix this. First, login as an Exchange (or Global) Administrator of the Office 365 tenant. Here’s the PowerShell code for sign in (see Connect to Exchange Online PowerShell for more details).

$cred = Get-Credential
$session = New-PSSession -ConfigurationName Microsoft.Exchange `
-ConnectionUri https://outlook.office365.com/powershell-liveid/ `
-Credential $cred -Authentication Basic -AllowRedirection
Import-PSSession $session

(Use https://outlook.office.de/powershell-liveid/ for connecting to Office 365 Germany.)

Okay, now we can check the Office 365 groups in that tenant:

Get-UnifiedGroup

…or all details of a specific Group by Name, in my case of the support” Group:

Get-UnifiedGroup -Identity support | fl

SNAGHTML41cb6df

The next steps are easy going: Add the users who shall be entitled of sending from the support” Group:

Add-RecipientPermission support@contoso.com -AccessRights SendAs -Trustee mg@contoso.com
Add-RecipientPermission support@contoso.com -AccessRights SendAs -Trustee tp@contoso.com

A confirmation is needed (if you don’t provide that as parameter):

image

That’s it. Now it’s time to retry… another email is sent FROM the "support@contoso.com" Group:

image

If it works, you should get the email from "support@contoso.com".

image

Office 365 Groups offer many benefits – use them!

Comments (2) -

  • Tomislav Karafilov

    6/14/2017 7:45:35 PM |

    In short, it works!
    I tried sending the Group mail to an external mail address, that did not work. Then sending to a group member's address, it worked. After this again with an external mail address and it works also. Must have been a timing problem.
    My group is a private group, generated out of Microsoft Teams. I tried  answering to the mail and I got the following error message:

    UnifiedGroupAgent; Delivery failed because the sender isn't a group member or external senders aren't permitted to send to this group.

    To fix this, I used the following two PowerShell command, to disable "RequireSenderAuthenticationEnabled" and to add my external mail adress to the "AcceptMessagesOnlyFromSendersOrMembers" property:

    Set-UnifiedGroup -Identity TeamCC_1234567890 -RequireSenderAuthenticationEnabled $false
    Set-UnifiedGroup -Identity TeamCC_1234567890 -AcceptMessagesOnlyFromSendersOrMembers TeamCC_4474260f8c;mr.extern@extern.com

    Now I could Reply from the external mail adress.

  • Toni Pohl

    6/18/2017 9:19:46 PM |

    Hi Tomislav,
    cool, many thanks for your feedback and your additional info!
    thx, Toni

Loading