Hot answers tagged

5

Possibly the most common approach for dealing with this is to use the ASP.net LoginView control. In your master page/page layout/whatever, simply wrap the markup/controls you wish to display to authenticated/anonymous users in a LoginView control - this will allow you to easily specify who should see what. Effectively you don't need to do anything ...


5

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.


4

Create the links using a "Content Editor Web Part" and assign "Target Audiences" to that web part. So that the links can be targeted to appear only to people who are members of a particular SharePoint group or audience. Reference Links: http://msdn.microsoft.com/en-us/library/ee906649(v=office.14).aspx ...


4

No matter how you do it it's going to be a major headache when you're only limited to SharePoint Foundation. You don't have any advanced out of the box user/audience control with SharePoint Foundation. When you insert webparts, to avoid heavy load on the page, set them to hidden right after you insert them on the page. That way they are already hidden and ...


3

AudienceID is an internal field set by SharePoint. You can't set it, but you can retrieve it if it has been saved to the db. What is your requirement that means you have to control the audience ID? Typically you would retrieve Audience by name. If you need to you can then access the AudienceID value. Hope that helps.


3

Performing these steps should resolve your issue: Login to a farm server (that hosts SharePoint Server) as the farm setup user administrator account. Launch Central Administration as administrator. Go: Application Management > Service Applications > Manage service applications. Select (don't click on) your user profile service application. Up above, on the ...


3

Step 1 The AudienceLoader class is just a cache of the user's audience information and so it can sometimes give some misleading results. Try using the Audience.IsMember function instead: Audience audience = audienceManager.GetAudience("Testing"); SPUser currentUser = SPControl.GetContextWeb(Context).CurrentUser; if ...


2

AudienceLoader objAudLoader = AudienceLoader.GetAudienceLoader(); AudienceManager.IsCurrentUserInAudienceOf(objAudLoader, audience, false) The AudienceLoader belongs to Microsoft.Office.Server.Audience namespace and documented here: http://msdn.microsoft.com/en-us/library/microsoft.office.server.audience.audiencemanager.iscurrentuserinaudienceof.aspx ...


2

You may get some errors while running this script but you will find that its worked too :) URL FIX $hubUrl = "NEW_NAME_OF_WEBAPP" $find = "OLD_NAME_OF_WEBAPP" "Installing..." Add-PSSnapIn Microsoft.SharePoint.PowerShell if ([Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") -eq $null) { throw "Unable to load Microsoft.SharePoint.dll!"; ...


2

Are the external zone just an alternate access mapping (AAM) or is it an extended web app (new zone) with other authentification?


2

Solved By mistake we had a "-" char in the word "Culture" in web.config Long version: We were implementing custom audience Runtime Filter to enable targetting for Anonymous users and we replace the OOTB "Microsoft.Office.Server.Audience.AudienceManager" runtime filter with our custom audience Runtime Filter When making the entry into the web.config ...


2

As Kishork noted, this particular issue was related to a custom audience filter. Just wanted to add that we've seen this same issue several times in our Sharepoint 2010 environment after using Metalogix to move content, or running various jobs. The initial symptom is the same - the target audience property isn't visible when editing a web part. Running ...


2

You can extend the SPSecurityTrimmedControl class to create a custom control that discriminates based on group membership rather than permission level. using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.SharePoint.WebControls; using System.Web.UI; using Microsoft.SharePoint; namespace My.Custom.Controls { ...


2

You can either place your links as hyperlinks in a Content Editor web part or you can use the Summary Links web part and place that web part on your page. Then "Edit Web part" >> Advanced >> Target Audience >> Add or Select your Group.


2

We reported this to MS Support and the behaviour is fixed with the "September 9, 2014 Cumulative Update for SharePoint Server 2013 package" We checked the fix on three farms and it worked. Just don't be confused by the error description in th KB article as it does not seem to have anything to do with this problem here. You can the CU here ...


2

Please refer link below link Mr. Raju http://social.technet.microsoft.com/Forums/da/sharepoint2010programming/thread/181fdb91-b16d-4e51-a9a4-454c8ad1c374 You will find that it is not possible because SharePoint manages GUID internally. so you can not assign it. in some cases it is possible but in your case it is not possible.


2

Are you trying to hide/show links in top navigation bar ? If so, you can assign group level permissions to page which you want to hide . i.e. click edit page in site action menu select page tab in command bar and click on Page permissions from ribbon it will redirect you to permissions page and click on stop inheriting permissions and select the group ...


2

No The only way to do this would be creating a separate page for each "audience" which are security trimmed. You can then place a List View Web Part on each page which contains your custom view. Of course, the challenge then is providing appropriate navigation :)


2

To my knowledge you do not add User to an Audience, but rather build rules that would include the respective user to an audience. Creating rule based Audiences is available here http://msdn.microsoft.com/en-us/library/ms498178 Then you could check is user is part of an Audience in a particular Web, see here http://msdn.microsoft.com/en-us/library/ms500775


2

Most of the navigation settings are heavily cached within the site collection object cache. If your cache is large (by default it's 100mb so it can already fill a lot into) you might run into a cache issue. Try to apply all relevant settings (ordering, hiding, audience targeting) then reset your site collection object cache (from the root of your site ...


1

I've come across similar issues when the DLs where Scoped at Universal instead of Global. I'm not sure if that is something you can change but it's worth a look.


1

Using Audiences would not give you the security that is otherwise enforced by the Permissions. Anyone knowing the item's address would be able still to access it. Audiences are mostly used in scenarios such as content targeting, but does not change permissions access based on these rules, e.g. it only hides/shows web parts or records, depending on which ...


1

Try creating a view. Navigate to that view, and "Edit" the page. Then edit the List View Web Part, expand advanced, and add your audience. This does not hide the view in the dropdown however. If you create this based on a personal view this wont be an issue as the users without the appropriate permission cant select this view from the View dropdown.


1

As an alternative to Groups based restriction, you could use Permission based: You can use security trimming within SharePoint Designer to do this. Put html code within the following brackets: <SharePoint:SPSecurityTrimmedControl runat="server" Permissions=""> Within the Permissions parameter change the role level to the appropriate setting. Here ...


1

I would have your code that you have above within all the webparts! if (boolThisTypeOfUser) // needs particular webparts { //createchildcontrols as normal } can you see where im getting to? this way it knows to show the webpart by carrying on with the code within the createchildcontrols! otherwise dont do anything! Your also getting rid of the ...


1

See my previous answer on the exact same issue here SP Group not for Navigation audience but there it is in the Browse! Yargh! It is a known bug with Target Audience not recognizing groups and can be fixed by providing unique names of SP groups per site collection.


1

First of all: imho I wouldn't use the code sample you have included in your question. That would only allow you to cycle on the collection of web parts available on a page, and then hide the target webpart based on the name. Unless you add some other logic it won't help you, and even then it seems a "cannon to hunt a rabbit" approach (you would modify the ...


1

The audiences are not taken into account on the search results page (web part). Managing the security would be the easiest way to implement this. If you really needed to perform audience targeting, consider what it is you are trying to do. Do you simply want to filter the content by audience post-page load. If this is the case then a custom web part that ...


1

I was able to do this. I created a custom stored procedure (by copying and modifying the one used by the API to create audiences) to create the audience with the GUID I needed. Look at the ORGLE procs inside the Profile DB to see how this is done. Anyways, once I created the audiences with the proc. I used central admin to configure the rules. In general, ...



Only top voted, non community-wiki answers of a minimum length are eligible