none
Set-MailboxJunkEmailConfiguration not working

    Question

  • Hello.

    I need to append a sender to TrustedSendersAndDomains in all accounts in my Office365. I did a test with some random mailbox:

    get-MailboxJunkEmailConfiguration -identity "user@mydomain.com"

    All infos are showed. Its fine.

    So I run this command to append the sender to TrustedSendersAndDomains:

    Set-MailboxJunkEmailConfiguration -identity "user@mydomain.com" -TrustedSendersAndDomains @{Add="sender@mydomain.com"}

    And the error:

    Property validation failed
        + CategoryInfo          : NotSpecified: (:) [Set-MailboxJunkEmailConfiguration], PropertyValidationException
        + FullyQualifiedErrorId : [Server=RO1PR80MB3515,RequestId=20ae77cc-698f-4c9c-8dd1-8261f664ddb6,TimeStamp=17/05/2019 14:40:17] [F
       ailureCategory=Cmdlet-PropertyValidationException] 59FD98CB,Microsoft.Exchange.Management.StoreTasks.SetMailboxJunkEmailConfigur
      ation
        + PSComputerName        : outlook.office365.com

    I run this command in PS Exchange Online. user@mydomain.com and sender@mydomain.com are corrects e-mails. Today all mails in TrustedSendersAndDomains are corrects.

    Why I can't append the sender?

    Friday, May 17, 2019 2:42 PM

All replies

  • Are you trying to add users from the same domain to the safe senders list? This is not a supported configuration afaik, thus the error.
    Friday, May 17, 2019 6:27 PM
  • Vasil is right, you could only add the user from other domains, issue can be simply reproduce in my lab:

    Also see the Note under the description of the -TrustedSendersAndDomains parameter in Set-MailboxJunkEmailConfiguration.

    Notes:

    All email addresses in the global address list (GAL) are automatically considered as trusted senders, so you don't need to add them to the list.

    Regards,

    Manu Meng


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Monday, May 20, 2019 7:02 AM
    Moderator
  • Just checking in to see if above information was helpful. Please let us know if you would like further assistance.

    Regards,

    Manu Meng


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Friday, May 24, 2019 10:26 AM
    Moderator