Skip to main content
Audience Targeting
Rob avatar
Written by Rob
Updated over 9 months ago

Purpose

A targeting rule could be applied to each Microsoft Teams Template to define who can use it, based on the user profile data.
​
Intrinsically, targeting rules are a combination of values and expressions that are evaluated against a user profile to determine if a template is shown to the user or not.

Available Audience Targeting Criteria

To build an audience targeting rule, you can rely on any Entra ID Attribute (Standard and Custom) and on any Entra ID Group (Security Groups; Distribution list; M365 Groups).

Simply start typing to get suggestions:

Rule Logic

Based on any of these criteria you can build your own rule with an OR and AND logic.

==

to define the value

!==

to get everything else than the value defined

||

OR

&&

AND

()

To regroup criterias

Examples

You'll find here after a list Common Scenarios for the audience targeting.Β 

Target: Users in France

Target: Users outside of Germany

Target: English speakers from any country

user.preferredLanguage.includes('en-')

Target: French or Belgium users from the Marketing Department

( user.country == 'FR' || user.country == 'BE' ) && user.department == 'Marketing'

Domain-based targeting: "users with @contoso.com or @contoso.fr in their domain name"

user.email.includes('@contoso.com') === true || user.email.includes('@contoso.fr') === true

Email based targeting: users with email1@contoso.com or email2@contoso.fr, etc

user.mail === '[email protected]' || user.mail === '[email protected]' || user.mail === '[email protected]'

Based on Group Membership

user.groups.direct.some(group => group.id === ('a937979b-5dbb-4f54-a405-936046244b0b'))

If you're struggling to build an audience targeting rule, don't hesitate to reach us.

Did this answer your question?