DistributionGroup permissions

Roger Roger 7,306 Reputation points
2024-10-12T08:26:58.3966667+00:00

Hi All

i have a DL in Exchange online, lets say ******@contoso.com. i have users list in csv file in the below format.i want to import the csv file and provide users Send As/Send Onbehalf permission to the DL. Please let me know if the below syntax is correct.

users
******@contoso.com
******@contoso.com

$users = Import-Csv -Path "c:\temp\input.csv"
foreach ($user in $users) {
    Add-RecipientPermission -Identity ******@contoso.com -Trustee $user.users -AccessRights SendAs
     Set-Mailbox -Identity ******@contoso.com -GrantSendOnBehalfTo @{Add=$user.users}
}

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 | 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.
{count} votes

Answer accepted by question author
  1. Anonymous
    2024-10-14T07:13:09.9966667+00:00

    Hello, @Roger Roger,

    Welcome to the Microsoft Q&A platform!

    If you need to add permissions for a large number of users at the same time, I have tested the command you provided and it does what you need. If you encounter any other issues, you can provide the error code and screenshots, which will help to resolve your issue more efficiently.User's image

    User's image User's image

    If you don't have many users that you need to assign permissions to, I suggest you do it directly in EAC, it will be easier and faster. Here are the steps to provide users with Send As/Send On behalf permissions to the DL in EAC.

    1.Log in to EAC and click Recipients>Groups>Distribution List.

    2.Click on the target DL and select Settings>Edit manage delegates.

    3.Add delegates for the target users according to your requirements.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Thank you for your support and understanding.

    Best Wishes,

    Alex 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.