how to implement audience using CSOM?

Brass Contributor

I am trying to target content based on audience feature of sharepoint. Requirements demands to customize the UI which includes attachment.  Conent Query Web Part (CQWP) supports the audience but attachment link is not supported.

 

Only option left is to write an CSOM code to pull the data and target content to audience. But I could not find any links related to this implementation.

 

Is it possible to implement audience using CSOM or JSOM or REST API?

2 Replies

You don't mention whether you are online or on-premises. For online deployments, the typical approach is to create a custom web part that inherits from the web part with the closest functionality.

 

If you do not want server-side code, then you will need to code the audience functionality yourself.

@paulschaeflein - Thanks for the input.

 

Sorry for missing that bit. I am using sharepoint online.

 

Server side code webparts are deprecated recently in online version. I think only option left out is to implement using CSOM.