Forum Discussion
Problems for adding users in DIstribution Dynamics groups with ExtensionCustomAttribute
- Jul 13, 2022
The problem with the example commands is that we don't have any data to compare them against.
If you go back to the Get-ExoMailbox commandlet you used to fetch this data:
With this screenshot, we can't tell if you've provided a single value or multiple values (i.e. via using an array with Set-Mailbox.).
Then try running the following command (using your mailbox, of course.) If the values all come out on one line then you haven't run Set-Mailbox properly - as shown in the first example (in red) from the screenshot below.
(Get-ExoMailbox -Identity test.mailbox -Properties ExtensionCustomAttribute1).ExtensionCustomAttribute1;If you have run Set-Mailbox properly, then you should find all of the values exist on their own separate line - as per the second example (in green.)
This is what I spoke about in my previous post. But if you are seeing the values on separate lines, then something else is amiss.
Cheers,
Lain
Hey, Valgruund.
You've given us an example rule definition for a distribution group named "testRD1", which is helpful.
It would be helpful if you could provide the values of those attributes from a mailbox that is missing from the distribution group, where you are expecting that it should have been included.
For example:
Get-EXOMailbox -Identity email address removed for privacy reasons -Properties extensionCustomAttribute1, customAttribute15, recipientTypeDetails | Select-Object -Property extensionCustomAttribute1, customAttribute15, recipientTypeDetails;
Where "email address removed for privacy reasons" is the mail address of the user you thought should be in the distribution group but is missing.
Being able to see the attribute values is important to understanding whether or not they match the rule.
Here's two quick observations from your second spoiler:
- Line 12: If you ran this Set-Mailbox, you would be adding a single string with the value of "#conseiller, #resp_thema, #rive_droite, #urbain". If you wanted to add the four tags as separate values (which I expect is what you're trying to do), they should be typed out like this: "#conseiller", "#resp_thema", "#rive_droite", "#urbain"".;
- Line 19: Has a spelling mistake. "ExtentionCustomAttribute1" should actually be "ExtensionCustomAttribute1".
So, if you were to uncomment those lines and run them, they might not do what you expect.
The third spoiler doesn't help to make things any clearer, but it's worth noting that if the user your testing with does not live in or under "RecipientContainer", it won't appear in the list of users.
Cheers,
Lain
Hi LainRobertson , Thanks for your answer !
I'm currently testing this point :
Line 12: If you ran this Set-Mailbox, you would be adding a single string with the value of "#conseiller, #resp_thema, #rive_droite, #urbain". If you wanted to add the four tags as separate values (which I expect is what you're trying to do), they should be typed out like this: "#conseiller", "#resp_thema", "#rive_droite", "#urbain"".;
It seems to be the problem, it worked well few month ago but if now we have to do it like that it's OK ! 😄
I'm working on it and give my final status on the result 🙂
Here is the get-exomailbox for my test member:
Nothing seems to block the conditions so I think the problem comes from the previously mentionned point.
I keep you in touch for that, and thanks again
Vaalgruund.
- VaalgruundJul 13, 2022Copper Contributor
Hello,
After few tests the problem is still the same but I have seen that the rule only check the first condition without taking account of the -or but take in account the -and
At least I have a little progress, the first tag is recognized by the rule !
For information, there is my rule :
Spoiler((((ExtensionCustomAttribute1 -eq '#conseiller') -or (((ExtensionCustomAttribute1 -eq '#garantie_jeunes') -and (CustomAttribute15 -eq '29BRE'))))) -and (-not(Name -like 'SystemMailbox{*')) -and (-not(Name -like 'CAS_{*')) -and (-not(RecipientTypeDetailsValue -eq 'MailboxPlan')) -and (-not(RecipientTypeDetailsValue -eq 'DiscoveryMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'PublicFolderMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'ArbitrationMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'AuditLogMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'AuxAuditLogMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'SupervisoryReviewPolicyMailbox')))
For information (bis), when I've created the rule, this was theses conditions, MS add the conditions above automatically, it doesn't help for the tests
:SpoilerThe thing that is incomprehensible is that it work well for the majority of the users, just some of them don't integrate properly on the DDG(ExtensionCustomAttribute1 -eq '#conseiller') -or (ExtensionCustomAttribute1 -eq '#garantie_jeunes') -and (CustomAttribute15 -eq '29BRE')
I keep digging !
Vaalgruund- LainRobertsonJul 13, 2022Silver Contributor
The problem with the example commands is that we don't have any data to compare them against.
If you go back to the Get-ExoMailbox commandlet you used to fetch this data:
With this screenshot, we can't tell if you've provided a single value or multiple values (i.e. via using an array with Set-Mailbox.).
Then try running the following command (using your mailbox, of course.) If the values all come out on one line then you haven't run Set-Mailbox properly - as shown in the first example (in red) from the screenshot below.
(Get-ExoMailbox -Identity test.mailbox -Properties ExtensionCustomAttribute1).ExtensionCustomAttribute1;If you have run Set-Mailbox properly, then you should find all of the values exist on their own separate line - as per the second example (in green.)
This is what I spoke about in my previous post. But if you are seeing the values on separate lines, then something else is amiss.
Cheers,
Lain
- VaalgruundJul 29, 2022Copper ContributorHello,
This solution seems to works well ! The problem is fixed ! Thanks a lot Lain !
You save me lol !
Vaalgruund