Forum Discussion
Hello World
Dec 20, 2017Copper Contributor
Address List Filter.
Hello World,
In a total road block here. Here the break down of what I got:
Sync Mail Contacts from AD to Azure AD - No problem.
Run the following commands to filter this contacts i...
VasilMichev
Dec 20, 2017MVP
First of all, there are limited sets of attributes you can use for address lists in O365, and in general I'd suggest you use the RecipientFilter parameter. In any case, once you have created the address list, you need to "touch" the objects in order for them to appear in it. Meaning, you need to update any of their properties for them to appear in the newly created AL. Read here: http://support.microsoft.com/kb/2955640
Hello World
Dec 20, 2017Copper Contributor
Thank you for the response, but unfortunately this doesn't help.
The problem with the Recipient Filter is that OPath doesn't like Company Attribute, which is why CustomCompanyAttributes (I suppose). In any event, using CustomAttribute didn't really yield any great results neither.
Meaning, taking the company name and placing into custom attribute 1 thru 15. Here the results of Get-AddressList, naturally some stuff is removed for personal reasons.
RunspaceId : 384d5f1c-3e49-467e-9246-3671c19c3161
Container : \Address Lists Container\All Address Lists
Path : \Address Lists Container\All Address Lists\PSI Contacts
DisplayName : PSI Contacts
Name : PSI Contacts
RecipientFilter : ((((Company -eq 'TaTa.com') -or (Company -eq 'BlaBla.com') -or (Company
-eq 'LaLa.com') -or (Company -eq 'AhAh'))) -and (RecipientType -eq 'MailContact'))
LdapRecipientFilter : (&(|(company=TaTa.com)(company=BlaBla.com)(company=LaLa.com)(company=AhAh)
)(objectClass=contact)(mailNickname=*))
LastUpdatedRecipientFilter :
RecipientFilterApplied : False
IncludedRecipients : MailContacts
ConditionalDepartment : {}
ConditionalCompany : {TaTa, LaLa.com, BlaBla.com, AhAh.com}
ConditionalStateOrProvince : {}
ConditionalCustomAttribute1 : {}
ConditionalCustomAttribute2 : {}
ConditionalCustomAttribute3 : {}
ConditionalCustomAttribute4 : {}
ConditionalCustomAttribute5 : {}
ConditionalCustomAttribute6 : {}
ConditionalCustomAttribute7 : {}
ConditionalCustomAttribute8 : {}
ConditionalCustomAttribute9 : {}
ConditionalCustomAttribute10 : {}
ConditionalCustomAttribute11 : {}
ConditionalCustomAttribute12 : {}
ConditionalCustomAttribute13 : {}
ConditionalCustomAttribute14 : {}
ConditionalCustomAttribute15 : {}
RecipientContainer :
RecipientFilterType : Precanned
Identity : \PSI Contacts
Id : \PSI Contacts
IsValid : True
In the recipients filter, the OR operator is automatically place when you use CustomCompany Parameter. But I've also gotten the AND operator too, but the results are the same.
The problem with the Recipient Filter is that OPath doesn't like Company Attribute, which is why CustomCompanyAttributes (I suppose). In any event, using CustomAttribute didn't really yield any great results neither.
Meaning, taking the company name and placing into custom attribute 1 thru 15. Here the results of Get-AddressList, naturally some stuff is removed for personal reasons.
RunspaceId : 384d5f1c-3e49-467e-9246-3671c19c3161
Container : \Address Lists Container\All Address Lists
Path : \Address Lists Container\All Address Lists\PSI Contacts
DisplayName : PSI Contacts
Name : PSI Contacts
RecipientFilter : ((((Company -eq 'TaTa.com') -or (Company -eq 'BlaBla.com') -or (Company
-eq 'LaLa.com') -or (Company -eq 'AhAh'))) -and (RecipientType -eq 'MailContact'))
LdapRecipientFilter : (&(|(company=TaTa.com)(company=BlaBla.com)(company=LaLa.com)(company=AhAh)
)(objectClass=contact)(mailNickname=*))
LastUpdatedRecipientFilter :
RecipientFilterApplied : False
IncludedRecipients : MailContacts
ConditionalDepartment : {}
ConditionalCompany : {TaTa, LaLa.com, BlaBla.com, AhAh.com}
ConditionalStateOrProvince : {}
ConditionalCustomAttribute1 : {}
ConditionalCustomAttribute2 : {}
ConditionalCustomAttribute3 : {}
ConditionalCustomAttribute4 : {}
ConditionalCustomAttribute5 : {}
ConditionalCustomAttribute6 : {}
ConditionalCustomAttribute7 : {}
ConditionalCustomAttribute8 : {}
ConditionalCustomAttribute9 : {}
ConditionalCustomAttribute10 : {}
ConditionalCustomAttribute11 : {}
ConditionalCustomAttribute12 : {}
ConditionalCustomAttribute13 : {}
ConditionalCustomAttribute14 : {}
ConditionalCustomAttribute15 : {}
RecipientContainer :
RecipientFilterType : Precanned
Identity : \PSI Contacts
Id : \PSI Contacts
IsValid : True
In the recipients filter, the OR operator is automatically place when you use CustomCompany Parameter. But I've also gotten the AND operator too, but the results are the same.