2

I need to get all the audiences which are added a rule with Location user profile property under manage audiences section programmatically using C#, I tried

 SPServiceContext sc = SPServiceContext.GetContext(newSite);
 AudienceManager audienceManager = new AudienceManager(sc);
 AudienceCollection ac = audienceManager.Audiences;

but I can't, Please suggest me some idea to achieve this?

  • There's not enough context to really know what you're asking for. Are you asking for the members of an audience? Navigation elements with restricted audiences? locations is very unclear. Please edit your question to describe exactly what you're looking for, thanks! – theChrisKent Dec 22 '16 at 14:28
  • please be specific on what you want to do....thanks! – Siddharth Vaghasia Dec 22 '16 at 16:33
  • I Updated the Question@SiddharthVaghasia – Suriya Dec 25 '16 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.