Office 365 Dynamic Distribution Group RecipientFilter Wild Cards

Anonymous
2019-03-15T16:52:12+00:00

We are in the process of migrating to Office 365 from Exchange 2010.  On my on premise environment, I have created Dynamic Distribution Groups based on the Notes/Info attribute.

Note Attribute looks like this “|A1|A2|A3|A4|C2|C3|C4|C5|”

To filter the recipients I did a:

Set-DynamicDistributionGroup "DynamicGroupName" -RecipientFilter {((notes -like "*A2*"))}

This works with on premise but not in Office 365. I get a "Wildcards cannot be used as the first character" error

-RecipientFilter

*In cloud-based environments, you can't use a wildcard as the first character. For example, Sales* is allowed, but *Sales isn't allowed.

*In on-premises Exchange, wildcards are valid only as the first or last character. For example, Sales* or *Sales are allowed, but Sa*les isn't allowed.

I tried this in Office 365 but no results

Set-DynamicDistributionGroup "DynamicGroupName" -RecipientFilter {((notes -like "A2*"))}

Does anyone know a work around?

Microsoft 365 and Office | Subscription, account, billing | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2019-03-20T01:35:07+00:00

    Hello TheBigT42,

    Welcome to post back.

    According to your information, I'm afraid no those Dynamic Distribution Groups related data in the Exchange online, so the PowerShell cmdlets did not return any results.

    To confirm it, please connect to Exchange Online firstly, and then run the below cmdlet to see if you can get the detailed RecipientFilter information:

    Get-DynamicDistributionGroup -Identity "DynamicGroupName"  |fl RecipientFilter

    Also, we will send you a private message to collect the result.

    Regards,

    Rudy

    0 comments No comments
Answer accepted by question author
  1. Anonymous
    2019-03-15T17:50:29+00:00

    Hello TheBigT42,

    In the logical level, The string "A2*" is different with the string "*A2*". The former string says that the note starts from character 'A', but the latter string says that it contains the characters 'A' and '2'.

    So I suppose you don't have the Note attribute's value starts with the character 'A'. In this case, it makes sense that the Office 365 doesn't give any results.

    And you can try other properties to filter recipients if needed. For your reference: Filterable recipient properties

    Regards,

    Rudy

    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Anonymous
    2019-03-15T18:56:28+00:00

    Thank you for the input

    I understand "A2*" is different than "*A2*".  I am trying to create a dynamic distribution group in Office 365 that does not allow a wildcard in the first position.

    Our notes field looks like this:  “|A1|A2|A3|A4|C2|C3|C4|C5|” 

    I need to filter users with A2 or A3 to dynamic distribution groups.

    Changing this data to another attribute won't help because the wildcard can't be in the first position.

    TheBigT42

    0 comments No comments
  2. Anonymous
    2019-03-15T22:04:44+00:00

    Hello TheBigT42,

    Thanks for your reply.

    According to the information "In cloud-based environments, you can't use a wildcard as the first character", you may try to manually edit the value of Notes attribute to "U|A1|A2|A3|A4|C2|C3|C4|C5|", and then filter the users with the A2 or A3 via the below cmdlet:

    Set-DynamicDistributionGroup "DynamicGroupName" -RecipientFilter {((notes -like "U*A2*"))} to check it.

    Regards,

    Rudy

    0 comments No comments
  3. Anonymous
    2019-03-16T22:07:56+00:00

    Hello TheBigT42,

    Have you referred to my reply? Feel free to let us know how it goes now.

    Regards,

    Rudy

    0 comments No comments