How to filter SharePoint Pages by the Audience field with the MS Graph

Frymus Kamil (UniCredit Services) 0 Reputation points
2025-04-01T12:26:55.9833333+00:00

Hi,

I can query MS Graph Pages and filter them using the api(https://learn.microsoft.com/en-us/graph/filter-query-parameter), but I do not know how to filter by the Audience field(_ModernAudienceTargetUserField ?). What is more the Audience field is not returned by the MS Graph with all the fields in response.

I'm using the https://graph.microsoft.com/v1.0/sites/{id}/pages endpoint

I have tried as well with the https://graph.microsoft.com/v1.0/search/query but also here I do not know how to filter by Audience.

{
    "requests": [
        {
            "entityTypes": [
                "listItem"
            ],
            "query": {
                "queryString": "aspx path:\"https://xxxx.sharepoint.com/sites/s1\""
            }
        }
    ]
}

How can I query SharePoint Pages filtering them by Target Audiences?

PS. I'm using the application authentication with permission Sites.Selected of type Application and I can reach successfully pages of the site I'm quering.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,517 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Frymus Kamil (UniCredit Services) 0 Reputation points
    2025-04-04T08:38:45.0733333+00:00

    Hi,

    If the Graph API do not suppor tit, I will investigate other posibilities.

    BR

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.