Forum Discussion

Pam DeLung's avatar
Pam DeLung
Copper Contributor
Dec 11, 2019

Audience Targeting for News not working at Hub Site level

We have a Hub site and are pulling in news from sites associated with the Hub.  I have set targeted audiences on those news articles and have tested the functionality on the sites themselves - the audience targeting seems to work fine.  However, at the hub site level, pulling the news from those sites into a news web part, when I enable the audience targeting feature, no action is taken.  It doesn't appear the audience targeting functionality is working in this scenario. Is this expected behavior?

  • When you enable the option on the web part, you have to give it 10-15 minutes since it runs off search to update the search index for the users, but that is all there is too it. Make sure the audiences you are assigning, do not have the person logged in for the test in them as well obviously 😛
  • TrippMD's avatar
    TrippMD
    Copper Contributor

    Pam DeLung I am having this issue as well. I have waited as long as a 24 hour period and still the same result.

    • Laura Rogers just did a power hour over this and it was working. I’ll need to go test it out and see if something has broke or not.
      • Pam DeLung's avatar
        Pam DeLung
        Copper Contributor

        ChrisWebbTech - Yes!  I watched Laura's Power Hour on the audience targeting, but I can't remember if she covered this scenario.  It works perfect on same site testing for us.  It's the rolling up of news to hub site level - that's where we're seeing the issue of the audience targeting not working successfully.

    • Pam DeLung's avatar
      Pam DeLung
      Copper Contributor

      TrippMD  - Same here.  We put this in place over 24 hours ago, still not working. 

  • AMURDOCK's avatar
    AMURDOCK
    Copper Contributor

    We have the same issue. Has anyone been able to find if this is a bug, or just not supported by SharePoint Online?

    • NightmareRambo77's avatar
      NightmareRambo77
      Brass Contributor

      AMURDOCK 

      Hi,

      I managed to figure out the issue, you need to ensure the following for it to work correctly.

      1. ensure you have audience target enabled on sitepages of the actual site, and that you enable audience targetting on the news webpart, then verify its actually working correctly.

      2. Then go to the hub site, and do the same, enable on the sitepages of the hub and enable on the news webpart.

       

      In short you need to have audience target enabled on hub and on site for the news rollup to work not just on the hub. Hope this helps.

      • Lenkaa's avatar
        Lenkaa
        Copper Contributor

        NightmareRambo77 

        Hi everyone.

        One customer has the same problem. The audience is set in the Site Pages and in News webpart on both -  the Hub site and the associated site. Targeting works fine on the associated site. No news that has a target audience set in the source site (associated with the hub site) will be displayed on the Hub site News web part.

         

        Does anyone have any ideas what this could be? I'm getting frustrated with that.

        Thank you.

        Lenka

  • johnvienna's avatar
    johnvienna
    Copper Contributor

    Pam DeLung 

    We had also the same issue, like described with enabling target audience on the news webpart in combination with hub sites. I want to document couple of things, which we observed while solving this issue.

    1. News webparts target audience is depending on search if multiple site collections are involved
    2. It is enough to have target audience enabled on the site pages where the news is stored, you want to display on the news webpart(child site collection of a hub). It is not necessary to enable target audience on the site pages library where the page with  the news webpart is stored(parent hub).
    3. The two main fields to watch on the site pages library are Audience and AudienceIds
    4. We have changed the field schema XML property with Set-PnPField to hide the target audience field. We were setting the value of the field with some additional flows depending on the specific site collections, instead of letting the user choose the right AAD group. So, if you hide the Audience field the way we have done it, the field will not be crawled and therefore target audience will not work.  
    5. If you are using multiple target audience groups for one news page on some site collection the values of AudienceIds field are not complete. The Id of one of the groups is missing sometimes.   In this case we just had to deactivate and reactivate target audience on the library level of the effected site collection.

    After solving point 4 and 5 we managed to get the webpart working. So, the issue can be caused by so many different constellations, that it was quite hard for us to solve the issue.  Point 4 was a mistake in our setup and point 5 seems to be a SharePoint bug.  

  • JoshCook's avatar
    JoshCook
    Copper Contributor
    Just wanted to add my voice here to the many. For us it seems to be some issue with Hub site inclusion.

    Our setup: We have a Hub site and a child site that is an authoritative news site. Putting a news webpart on the home page of the child and turning on Audience Targeting - that news webpart respects the audiences and hides news stories accordingly. Putting a news webpart on the home page of the Hub site, telling it to include news from all hub sites, and turning on Audience Targeting - that news webpart does not respect audiences and shows everything. The audiences we are using are AAD groups (not SP Security groups).

    We have waited 24 hours, disabled and re-enabled audience. Removed and re-added to the hub. It consistently works if the news webpart is only looking at it's own site, but the moment you add any other site in the hub, it ignores the audiences entirely.
    • ChrispyBites's avatar
      ChrispyBites
      Copper Contributor
      We're experiencing this exact same issue with a client. In our case, the client is using Active Directory security groups synced to AAD. Interestingly, in my demo tenant, Audience Targeting works exactly as it says on the box when the groups being used in targeting are M365 Groups.
      • NightmareRambo77's avatar
        NightmareRambo77
        Brass Contributor
        I had a similar issue recently but wasn't audiences, i joined a site to another hub and it continued to show up on news on the original hub site, the only thing i did recently that was different was there was an approval flow to join the new hub, everything in sharepoint says its joined / associated to the new site but news still thinks its part of the hub for some reason. I have selected all sites in the hub with tick boxes and the site doesn't show but if i use all sites in the hub radio option it shows up again. So may have to exclude it from search and remove from hub and try it again at some point.

Resources