Hello @Allen Yang
When using the Microsoft Graph API to retrieve audit logs for Azure B2C, it's common to paginate through results using @odata.nextLink. If you're encountering intermittent errors when following the nextLink
Ensure the nextLink URL is used exactly as provided—do not decode or modify it.
To achieve this, you need to:
Select the beta endpoint
Add $count=true in the QueryString
Add ConsistencyLevel = eventual to the Request headers
https://graph.microsoft.com/v1.0/auditLogs/directoryAudits?$filter=loggedByService eq 'B2C' and activityDateTime gt 2019-09-10T02:28:17Z&$count=true
Reference : https://devblogs.microsoft.com/microsoft365dev/build-advanced-queries-with-count-filter-search-and-orderby/
Hope this helps. Do let us know if you have any further queries.