Link to home
Create AccountLog in
Avatar of alonig1
alonig1

asked on

Powershell add user to allowed senders list

On a hybrid environment I have a group that allowed only certain senders  , I need to add a user to it.

When the user attempts to send an email they get this: "The Group ******* only accepts messages from people on it's allowed senders list, and your email address isn't on the list."

and when I try to do it through the office 365 portal I get this error (see image)

What is the command in powershell to complete this task?
error1.jpeg
Avatar of footech
footech
Flag of United States of America image

The distribution group will be restricted so that only members of the security group can send to it.  So to change the membership you wouldn't be changing the distribution group, you would only be changing the membership of the security group in your AD.  And that should be easy to do just using ADUC.  If you really want to use PS to modify the group membership, it would be the Add-ADGroupMember cmdlet.  Something like:
Add-ADGroupMember -Identity "secgroup" -Members "jdoe"

Open in new window

Avatar of alonig1
alonig1

ASKER

Thats the group membership not the allowed senders.
The group membership of the security group is the allowed senders.

Edit:  I suppose they could be separate, i.e. you could add the user individually to be allowed to send to the distribution group, but is there a compelling reason to do so instead of just adding the user to the security group?
Avatar of alonig1

ASKER

No.

There is a group and members of that group - thats the regular thing.

There are certain people/users that are allowed to send email to that group, other users will attempts to send will get a reply that they are not allowed to send emails to that group.
I get the feeling that we're talking past each other.
Are you saying that instead of assigning a security group as the allowed senders to the distribution group, you have only set individual users?
Avatar of alonig1

ASKER

I don't understand.

There is a distribution group , that only specific senders are allowed to send to that group.
Avatar of alonig1

ASKER

see attached image.
ee2.jpg
There is a distribution group , that only specific senders are allowed to send to that group.
Yes, that has been clear from the very beginning.

Is each one of the blurred entries an individual user?

Your allowed senders can either include individual accounts, or it can include security groups (in which case each member of the security group is allowed).
Regardless of your answer, as I mentioned before if you have it set to a security group you can just change that group's membership.

If you want to add the individual user (or add another group), you have the edit the dlMemSubmitPerms attribute of the distribution group in your AD to add the account's or group's distinguishedName.
Avatar of alonig1

ASKER

No.

I tried to add a member to that group the person receives the emails of that group but still won't be allowed to send to that group.

the group has two features the regular thing of being part of a group and receiving emails , but also a different list of allowed senders list.
Avatar of alonig1

ASKER

see image.
ee3.jpg
I don't know why you're not understanding me.  I never said that adding the user to the distribution group would mean that they could send to it.  Do you know the difference between a security group and a distribution group?  And even if you're not using a security group to restrict who can send to the distribution group, I already gave the instructions for how to add an individual account to the permissions.
ASKER CERTIFIED SOLUTION
Avatar of alonig1
alonig1

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Worked for the asker.