Permissions

Roger Roger 7,426 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 "******@contoso.com" -AccessRights SendAs -Trustee ******@contoso.com

Set-UnifiedGroup -Identity "******@contoso.com" -GrantSendOnBehalfTo ******@contoso.com

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

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

Set-DistributionGroup -Identity "******@contoso.com" -GrantSendOnBehalfTo ******@contoso.com

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

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

Exchange Online
Exchange Online
A cloud-based service included in Microsoft 365, delivering scalable messaging and collaboration features with simplified management and automatic updates.
Exchange | Exchange Server | Other
Exchange | Exchange Server | Other
A robust email, calendaring, and collaboration platform developed by Microsoft, designed for enterprise-level communication and data management.Miscellaneous topics that do not fit into specific categories.
Exchange | Exchange Server | Management
Exchange | Exchange Server | Management
The administration and maintenance of Microsoft Exchange Server to ensure secure, reliable, and efficient email and collaboration services across an organization.
Exchange | Hybrid management
Exchange | Hybrid management
The administration of a hybrid deployment that connects on-premises Exchange Server with Exchange Online, enabling seamless integration and centralized control.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Anonymous
    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 "******@contoso.com" -AccessRights SendAs -Trustee ******@contoso.com
    

    Add send on behalf of permissions:

     
    Set-UnifiedGroup -Identity "******@contoso.com" -GrantSendOnBehalfTo ******@contoso.com
    

    Remove send permissions:

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

    Remove send on behalf of permissions:

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

    For distribution lists

    Add send permissions:

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

    Add the Send on BehalfTo permission:

    Set-DistributionGroup -Identity "******@contoso.com" -GrantSendOnBehalfTo ******@contoso.com
    

    Remove the Send on BehalfTo permission:

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

    Remove the Send on BehalfTo permission:

    Set-DistributionGroup -Identity "******@contoso.com" -GrantSendOnBehalfTo @{Remove="******@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' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.