Hi @Jack-9275,
You can check about this code demo to enable audience targeting in SPFX Web Part solution:
Reusable Target Audience wrapper based on SharePoint groups for custom SPFx webparts
Here is the full code snippet in GitHub:
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
How do I enable audience targeting in custom SPFx Client Side Web Part in SharePoint Online?
Please provide a code example for it.
I have created audiences in the Audiences List under Manage Audiences in SharePoint Admin Center. However, when I enter the audience name in the Audience column in the Site Pages library for a Modern Page, message "No results found" is shown even though that particular audience has already been compiled.
Please let me know the solution for this issue.
Thanks.
Hi @Jack-9275,
You can check about this code demo to enable audience targeting in SPFX Web Part solution:
Reusable Target Audience wrapper based on SharePoint groups for custom SPFx webparts
Here is the full code snippet in GitHub: