Odata NextLink no work with Api Graph reports

Steph 0 Reputation points
2023-10-03T16:13:44.41+00:00

Hi,

When I use the Graph APIs which return JSON, like those for users, no problem, the pagination works well.

But with the Graph report APIs, which are in CSV format in V1.0, when we force beta with the json format, the impression is that it does not understand the following url well

beta/reports/getSharePointSiteUsageDetail(period='D180')?$format=application/json&$top=1000

I only have the 1000 results in the parquet file
wihtout &$top=1000 , only 200.

I tried adding a $ in front $['@odata.nextLink'], same result

1_Config

2-config

In postman, I also have the impression that the whole url is not underlined like in another API but it works when I take it entirely

3-postman

An idea ?

Thanks for your help.

Best regards

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
Microsoft Security | Microsoft Graph
{count} votes

1 answer

Sort by: Most helpful
  1. AnnuKumari-MSFT 34,566 Reputation points Microsoft Employee Moderator
    2023-10-10T11:20:09.47+00:00

    Hi Steph ,

    Welcome to Microsoft Q&A platform and thanks for posting your question here. It seems like you are facing an issue with pagination when using the Microsoft Graph API to retrieve SharePoint site usage details in JSON format.

    Pagination with Microsoft Graph API typically involves using the @odata.nextLink property in the response to retrieve the next set of results.

    Could you please try using None : $['@odata.nextLink'] as pagination treats $ as the json starting position. If we do not provide $ then we need to use body else use none property.

    Also, please try having the full baseurl instead of separating it with the endpoint as seen in your screenshot.

    User's image

    Additional resource: Azure Data Factory (ADF) Quick Tip: Using Graph API to Extract Azure AD Information

    Paging Microsoft Graph data in your app

    Hope it helps. Kindly let us know how it goes. Thankyou.

    1 person found this answer helpful.

Your answer

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