SharePoint 2016: export a list of all content Targeted to a specific Audience within site

sco gordo 301 Reputation points
2021-05-06T14:28:52.977+00:00

I have a Target Audience (eg: ContosoHRAud) that's used widely within a site. I need to provide a list of webparts and items and etc where ContosoHRAud is being applied. Any leads?
Thanks!
Scott

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,298 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,597 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,900 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. JoyZ 18,056 Reputation points
    2021-05-07T08:14:23.143+00:00

    @sco gordo ,

    Loop through all items in all lists in the site, check if column(Target Audiences)value equals ContosoHRAud to find where ContosoHRAud is being applied in all items.

    For web parts, iterate through all web parts in all pages in the site,check the web part property "AuthorizationFilter" values are equals ContosoHRAud to find where ContosoHRAud is being applied in all web parts.

    More information for your reference:

    https://www.c-sharpcorner.com/article/retrieve-webparts-from-page-using-csom-with-powershell-for-s/

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


    If an Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

  2. sadomovalex 3,631 Reputation points
    2021-05-10T14:55:50.257+00:00

    if you work with SP2016 on-prem you may use basic PowerShell for that. Here is example of script which lists all web parts and list items with audiences: SharePoint 2010: Programmatically find audience usage.

    0 comments No comments