Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Im creating a SharePoint-hosted app (restricted to use client side code only), and I want to retrieve documents from a library. Each document have a Target audience field.

I want to, in javascript:

  1. Read the Global audience from the list item
  2. Detect if current user belongs to the Global audience.

Is this even possible? I have browsed the web a lot for this.

share|improve this question

1 Answer 1

No, audiences are not supported in the SharePoint client object model. Its only supported in the Server Object Model. In the past I created a Web Service in SharePoint that could take a user name and return the audiences for that user, leveraging the Server Object Model...but that approach probably doesn't work in your scenario.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.