Permissions

Roger Roger 6,471 Reputation points
2024-11-15T23:52:44.7166667+00:00

I have a unified group and a distribution list (DL). I want to provide users with Send As and Send on Behalf permissions for the unified group/distribution list using PowerShell. I also want to know how to remove these permissions. Is the syntax below correct?

Add-RecipientPermission -Identity "unifiedgroup1@contoso.com" -AccessRights SendAs -Trustee user1@contoso.com

Set-UnifiedGroup -Identity "unifiedgroup1@contoso.com" -GrantSendOnBehalfTo user1@contoso.com

Remove-RecipientPermission -Identity "unifiedgroup1@contoso.com" -AccessRights SendAs -Trustee user1@contoso.com -Confirm:$false

Set-UnifiedGroup -Identity "unifiedgroup1@contoso.com" -GrantSendOnBehalfTo @{Remove="user1@contoso.com"}
=================================================================
Add-RecipientPermission -Identity "onlinedl1@contoso.com" -AccessRights SendAs -Trustee "user1@contoso.com"

Set-DistributionGroup -Identity "onlinedl1@contoso.com" -GrantSendOnBehalfTo user1@contoso.com

Remove-RecipientPermission -Identity "onlinedl1@contoso.com" -AccessRights SendAs -Trustee "user1@contoso.com" -Confirm:$false

Set-DistributionGroup -Identity "onlinedl1@contoso.com" -GrantSendOnBehalfTo @{Remove="user1@contoso.com"}

Microsoft Exchange Online
Exchange Server
Exchange Server
A family of Microsoft client/server messaging and collaboration software.
1,368 questions
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,624 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,702 questions
Microsoft Exchange Hybrid Management
Microsoft Exchange Hybrid Management
Microsoft Exchange: Microsoft messaging and collaboration software.Hybrid Management: Organizing, handling, directing or controlling hybrid deployments.
2,162 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jake Zhang-MSFT 7,315 Reputation points Microsoft Vendor
    2024-11-18T09:13:47.7333333+00:00

    Hi @Roger Roger ,

    Welcome to the Microsoft Q&A platform!Your PowerShell syntax looks mostly correct for managing the "Send As" and "Send on Behalf of" permissions for unified groups and distribution lists. Here are some adjustments and confirmations:

    For unified groups

    Add send permissions:

     
    Add-RecipientPermission -Identity "unifiedgroup1@contoso.com" -AccessRights SendAs -Trustee user1@contoso.com
    

    Add send on behalf of permissions:

     
    Set-UnifiedGroup -Identity "unifiedgroup1@contoso.com" -GrantSendOnBehalfTo user1@contoso.com
    

    Remove send permissions:

    Remove-RecipientPermission -Identity "unifiedgroup1@contoso.com" -AccessRights SendAs -Trustee user1@contoso.com -Confirm:$false
    

    Remove send on behalf of permissions:

     
    Set-UnifiedGroup -Identity "unifiedgroup1@contoso.com" -GrantSendOnBehalfTo @{Remove="user1@contoso.com"}
    

    For distribution lists

    Add send permissions:

    Add-RecipientPermission -Identity "onlinedl1@contoso.com" -AccessRights SendAs -Trustee "user1@contoso.com"
    

    Add the Send on BehalfTo permission:

    Set-DistributionGroup -Identity "onlinedl1@contoso.com" -GrantSendOnBehalfTo user1@contoso.com
    

    Remove the Send on BehalfTo permission:

    Remove-RecipientPermission -Identity "onlinedl1@contoso.com" -AccessRights SendAs -Trustee "user1@contoso.com" -Confirm:$false
    

    Remove the Send on BehalfTo permission:

    Set-DistributionGroup -Identity "onlinedl1@contoso.com" -GrantSendOnBehalfTo @{Remove="user1@contoso.com"}
    

    Please feel free to contact me for any updates. And if this helps, don't forget to mark it as an answer.

    Best,

    Jake Zhang


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.