
Explanation
Table Description automatically generated with medium confidence

Box 1: Register the app in Azure Active Directory
Box 2: Use FetchXML queries
The failure entries can be retrieved through the Get the failure details for a given Profile request. The response returns a URI to an Azure blob that contains the failure information. Each line has the following comma-separated fields (newlines added for clarity):
Entity: <entity-name>,
RecordId: <"N/A" | guid>,
NotificationTime: <datetime>,
ChangeType: <sync-type>,
FailureReason: <description>
Note: FetchXML is a proprietary XML based query language of Microsoft Dataverse used to query data using either the Web API or the Organization service. It's based on a schema that describes the capabilities of the language. The FetchXML language supports similar query capabilities as query expressions.
Reference:
https://docs.microsoft.com/en-us/powerapps/developer/data-platform/data-export-service
https://docs.microsoft.com/en-us/power-platform/admin/replicate-data-microsoft-azure-sql-database
https://docs.microsoft.com/en-us/powerapps/developer/data-platform/use-fetchxml-construct-query