SOLVED

Difficulties in creating Personalized Address Lists

Brass Contributor

Hi Good Morning Friends,

1) First of all, as always, I apologize if the words seem strange. I don't speak English and I use an online translator


2) Well, having said that, I have a doubt that after a few consultations I can't leave the place.


3) Briefly: I work with the big Tenet, with multiple domains. Although Tenet can be considered a large company and these domains are "its departments", these domains themselves are independent organizations that can even communicate with each other.


4) When you want to send a message to multiple recipients, querying the GAL, whether due to display limitations or an endless and non-assertive query, becomes a real inconvenience to the end user.


5) What's my best way?: Create custom Address Books (Address Book), where each List contains users from your own domain. That, in addition to the GAL itself, of course.


6) With that, I basically thought of:
- Create an Address Book
New-AddressList -Name 'DOMAIN1'
New-AddressList -Name 'DOMAIN2'

- Add the conditions and filters for each one:
Set-AddressList -Identity "DOMAIN1" -RecipientFilter "(RecipientType -eq 'UserMailbox')"
Set-AddressList -Identity "DOMAIN1" -RecipientFilter "(UserPrincipalName -like '*@domain1.com')"

 

Set-AddressList -Identity "DOMAIN2" -RecipientFilter "(RecipientType -eq 'UserMailbox')"
Set-AddressList -Identity "DOMAIN2" -RecipientFilter "(UserPrincipalName -like '*@domain1.com')"


... Although I would like to increment these lists from the CompanyName field of each user, existing in Azure AD ....


7) Well. the Address List appears normally, about a few minutes after I run the command for it to be created, but I really have difficulties in the part that deals with the user of each domain.


8) Could someone explain to me what could be happening? Better... Where am I going wrong, either in the execution OR in the conception of the idea?!


Many, many thanks for your attention and patience in helping with this issue!

 

5 Replies
You need one additional step here - in Exchange Online, you need to "touch" each object before they appear in Address Lists. Read here for details: https://learn.microsoft.com/en-US/exchange/troubleshoot/administration/new-address-lists-not-contain...

If after "touching" the objects you're still having issues, double-check your RecipientFilter.
Hello, I hope everyone is well...
Thank you very much Vasil Michev for his return...

If I may, let me ask if the logic for this outline is correct:

I adjusted the "CustomAttribute11" field of the domain accounts as desired (in this case I did it with two accounts of each):
Set-Mailbox email address removed for privacy reasons -CustomAttribute11 "DOMAIN1"
Set-Mailbox email address removed for privacy reasons -CustomAttribute11 "DOMAIN2"

That done, I created the lists:
New-AddressList -Name 'DOMAIN1'
New-AddressList -Name 'DOMAIN2'

Finally, I adjusted the list as follows:
Set-AddressList -Identity "DOMAIN1" -ConditionalCustomAttribute11 "DOMAIN1" -IncludedRecipients MailboxUsers

Set-AddressList -Identity "DOMAIN2" -ConditionalCustomAttribute11 "DOMAIN2" -IncludedRecipients MailboxUsers

I remove/clean the CustomAttribute11 attribute field (which is what I chose to use)
Set-Mailbox email address removed for privacy reasons -CustomAttribute11 $null
Set-Mailbox email address removed for privacy reasons -CustomAttribute11 $null

Is this the same idea? The "playback" time in the Exchange environment which is "tense" since we don't know if something is happening or not hehehe

Finally, now rereading, I found myself thinking that: When before I applied the "Set-AddressList" command twice where once I used "-RecipientFilter "(RecipientType -eq 'UserMailbox')"" and on the other "-RecipientFilter "(UserPrincipalName -like '*@domain1.com')"" I didn't actually add the two together. One overwrote the other.

I applied it here, as I mentioned above... I'm waiting to see "what happens".

Well, thank you very much for your feedback, for your help. Not only does it help me to better understand these applications, which are all new to me, but it makes me want to learn and do more and more.

Thank you very much, I look forward to your return and Hugs to all!!!
Hello again...

After two hours it didn't have the desired effect...

When querying the return is the following:

Get-AddressList 'DOMAIN1'

Name DisplayName RecipientFilter
---- ----------- ---------------
DOMAIN1 DOMAIN1 ((CustomAttribute11 -eq 'DOMAIN1') -and (RecipientType -eq 'UserMailbox'))

Where could I be going wrong?!
best response confirmed by tcboeira (Brass Contributor)
Solution
Well if you've cleared the value of CustomAttribute11, those mailboxes will definitely not appear in the newly created AL. If you are using the recipient filter shown above, set the value of CustomAttribute11 for few mailboxes, give it few minutes and check the AL membership (preferably in OWA). The "touch" part needs to be done once the AL is created, and you can use any attribute, such as changing the CustomAttribute11 from $null to something in this scenario.
Hello friends,
Hello Vasil Michev,

Sorry for the delay in replying...

Well, exactly as you described, I was anxious to quickly see the result and realized that when I configured the Attribute, in about 10 minutes the list was filled with contacts. And when I cleared the attribute logically the content of the list disappears.

The "play" as mentioned, I created a loop about 3x and it was surprisingly fast. Very show indeed.

The difficulty itself has been resolved and I am very grateful for your help. Thank you very much.

Finally, I'm just creating one more test using "-ConditionalCompany", but this one takes too long to populate the list. I think I'll opt for the Attribute I had tested before.

But again, thank you very much

PS: How do I mark the situation as resolved?
1 best response

Accepted Solutions
best response confirmed by tcboeira (Brass Contributor)
Solution
Well if you've cleared the value of CustomAttribute11, those mailboxes will definitely not appear in the newly created AL. If you are using the recipient filter shown above, set the value of CustomAttribute11 for few mailboxes, give it few minutes and check the AL membership (preferably in OWA). The "touch" part needs to be done once the AL is created, and you can use any attribute, such as changing the CustomAttribute11 from $null to something in this scenario.

View solution in original post