Exception to Client Access Rule is not working

Mikhail Firsov 1,876 Reputation points
2020-09-11T11:13:36.863+00:00

Hello,

One more question, please: I've added the new client access rule with the following parameter:

-ExceptUsernameMatchesAnyOfPatterns ****.net\A_Oliver

...but Exchange still keeps applying this rule to *******.net\A_Oliver

24307-rule.png

???

Thank you in advance,
Michael

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,199 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,360 questions
0 comments No comments
{count} votes

Accepted answer
  1. KyleXu-MSFT 26,211 Reputation points
    2020-09-14T01:42:22.783+00:00

    @Mikhail Firsov
    From the title of EMS, I guess you are using Exchange on-premises rather than Exchange Online.

    About "-ExceptUsernameMatchesAnyOfPatterns", it available only in Exchange online:
    24306-qa-kyle-0914093934.png
    You may could use this attribute in Exchange on-premises, but it won't do anything.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Ashok M 6,506 Reputation points
    2020-09-12T14:45:34.22+00:00

    Hi,

    Try using UserRecipientFilter instead of ExceptUsernameMatchesAnyOfPatterns.

    Set the CustomAttribute1 to Test for the user who needs to be added as an exception. In this case for A_Oliver.

    Create a new clientaccess rule like below,

    New-ClientAccessRule -Name "Block EAC Access” -Action DenyAccess -UserRecipientFilter {CustomAttribute1 -ne “Test”} -Priority 2

    Then test it using the Test-ClientAccessRule

    https://www.codetwo.com/admins-blog/how-to-block-external-access-to-exchange-admin-center-in-exchange-2019-via-client-access-rules/

    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    1 person found this answer helpful.

  2. Mikhail Firsov 1,876 Reputation points
    2020-09-15T12:57:32.453+00:00

    Thank you all for your replies!

    Sorry, missed it ("Applies to: Exchange online"). Thank you, AshokM-8240, for another method (Client-AccessRule).

    Regards,
    Michael

    0 comments No comments