Created Rules successfully using UpdateInboxRules API in Exchange server 2016 but did'nt showed up in ecp mailflow > rules

TechnoGenics Integrations 1 Reputation point
2021-08-11T08:21:48.92+00:00

Hi i have tried creating a rule using UpdateInboxRules API mentioned in this link: https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/updateinboxrules-operation. Rule is created successfully and i can see this rule with GetInboxRules API. Please have a look at attached response. But the rule i have created did'nt showed up in my ecp portal under mail flow -> rules. Any help would be apptreciated.

GetInboxRules API Response:

{
"s:Envelope": {
"@xmlns:s": "http://schemas.xmlsoap.org/soap/envelope/",
"s:Header": {
"h:ServerVersionInfo": {
"@MajorVersion": "15",
"@MinorVersion": "1",
"@MajorBuildNumber": "2242",
"@MinorBuildNumber": "4",
"@Version": "V2017_07_11",
"@xmlns:h": "http://schemas.microsoft.com/exchange/services/2006/types",
"@xmlns": "http://schemas.microsoft.com/exchange/services/2006/types",
"@xmlns:xsd": "http://www.w3.org/2001/XMLSchema",
"@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance"
}
},
"s:Body": {
"@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
"@xmlns:xsd": "http://www.w3.org/2001/XMLSchema",
"GetInboxRulesResponse": {
"@ResponseClass": "Success",
"@xmlns": "http://schemas.microsoft.com/exchange/services/2006/messages",
"ResponseCode": "NoError",
"OutlookRuleBlobExists": "false",
"InboxRules": {
"Rule": {
"@xmlns": "http://schemas.microsoft.com/exchange/services/2006/types",
"RuleId": "AQAAAAAABXY=",
"DisplayName": "Abuse-Rules",
"Priority": "1",
"IsEnabled": "true",
"Conditions": {
"FromAddresses": {
"Address": {
"Name": "Inbox",
"EmailAddress": "test@bn bn .com",
"RoutingType": "SMTP"
}
}
},
"Actions": {
"Delete": "true",
"StopProcessingRules": "true"
}
}
}
}
}
}
}

Exchange Server Development
Exchange Server Development
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Development: The process of researching, productizing, and refining new or existing technologies.
516 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Glen Scales 4,431 Reputation points
    2021-08-19T00:14:10.577+00:00

    What your doing in your code is creating an Inbox Rule which is a Mailbox specific rule so will only affect message that are arriving in the Mailbox you created it in

    Please have a look at attached response. But the rule i have created did'nt showed up in my ecp portal under mail flow -> rules. Any help would be apptreciated.

    What you see in Mail Flow rules are Transport Rules that are applied in the Transport Stack and affect every message that is processed by for your tenant. The only way of creating those type of rules programatically is via the Remote Powershell cmdlet New-TransportRule eg https://learn.microsoft.com/en-us/exchange/security-and-compliance/mail-flow-rules/manage-mail-flow-rules

    0 comments No comments