Notifications
Announcements
Can someone help identify the correct field or table that captures the error status of a Synapse Link sync job?
I’ve checked the synapselinkprofileentitystate table, which contains a syncstatus field, but it doesn't consistently reflect the actual error state. I'm looking for a more reliable way to track sync failures, especially for entities that encounter issues during synchronization.
synapselinkprofileentitystate
syncstatus
Variables: - ErrorThreshold: 5 (number of consecutive errors before alert) - MonitoringInterval: 15 (minutes) - LastRunTime: addMinutes(utcNow(), -15) - ErrorLog: [] - AlertRecipients: ["admin@company.com"] - SyncStatusValues: ["Error", "Failed", "Exception", "Stopped"]
Action: List rows (Dataverse) Table: synapselinkprofileentitystate Filter Query: (syncstatus eq 'Error' or syncstatus eq 'Failed' or syncstatus eq 'Exception' or syncstatus eq 'Stopped' or modifiedon ge @{variables('LastRunTime')}) Select columns: - synapselinkprofileentitystateid - entityname - syncstatus - statusreason - modifiedon - _synapselinkprofileentity_value - errormessage - lastsuccessfulsynctime
Action: List rows (Dataverse) Table: synapselinkprofileentityrun Filter Query: (runstatus eq 'Error' or runstatus eq 'Failed' or runstatus eq 'Exception' or modifiedon ge @{variables('LastRunTime')}) Select columns: - runid - runstatus - errormessage - errorcode - starttime - endtime - recordsprocessed - recordsfailed - _synapselinkprofileentity_value
Action: List rows (Dataverse) Table: synapselinkprofile Filter Query: statecode eq 0 Select columns: - synapselinkprofileid - name - destinationtype - storageaccountname - workspacename - statecode - statuscode
Apply to each - Error Records: Compose - Error Details: EntityName: @{item()?['entityname']} SyncStatus: @{item()?['syncstatus']} StatusReason: @{item()?['statusreason']} ErrorMessage: @{item()?['errormessage']} LastModified: @{item()?['modifiedon']} LastSuccessfulSync: @{item()?['lastsuccessfulsynctime']} ProfileEntityId: @{item()?['_synapselinkprofileentity_value']} # Get additional context from profile entity Get row by ID (Dataverse): Table: synapselinkprofileentity Row ID: @{item()?['_synapselinkprofileentity_value']} # Append to error log Append to array variable - ErrorLog: @{outputs('Compose_-_Error_Details')}
Table: synapselinkprofileentitystate Filter rows: syncstatus eq 'Error' or syncstatus eq 'Failed' Run settings: - Trigger conditions: @equals(triggerOutputs()?['body/syncstatus'], 'Error')
1. Get Related Profile Information: Get row by ID (Dataverse): Table: synapselinkprofileentity Row ID: @{triggerOutputs()?['body/_synapselinkprofileentity_value']} 2. Get Recent Run Details: List rows (Dataverse): Table: synapselinkprofileentityrun Filter: _synapselinkprofileentity_value eq '@{triggerOutputs()?['body/_synapselinkprofileentity_value']}' Order by: modifiedon desc Top count: 1 3. Compose Error Summary: { "EntityName": "@{triggerOutputs()?['body/entityname']}", "SyncStatus": "@{triggerOutputs()?['body/syncstatus']}", "ErrorMessage": "@{triggerOutputs()?['body/errormessage']}", "ProfileName": "@{outputs('Get_row_by_ID')?['body/name']}", "ErrorTime": "@{triggerOutputs()?['body/modifiedon']}", "RunDetails": "@{first(outputs('List_rows_-_Recent_Runs')?['body/value'])}" } 4. Send Alert: Send an email (V2): To: @{variables('AlertRecipients')} Subject: "Synapse Link Sync Error - @{triggerOutputs()?['body/entityname']}" Body: [Formatted HTML with error details]
1. Get All Entity States: List rows (Dataverse): Table: synapselinkprofileentitystate Select columns: entityname, syncstatus, modifiedon, lastsuccessfulsynctime 2. Get All Profiles: List rows (Dataverse): Table: synapselinkprofile Select columns: name, statecode, statuscode, modifiedon 3. Calculate Health Metrics: Apply to each - Entity States: Compose - Health Check: EntityName: @{item()?['entityname']} Status: @{item()?['syncstatus']} IsHealthy: @{if(or(equals(item()?['syncstatus'], 'Error'), equals(item()?['syncstatus'], 'Failed')), false, true)} LastSync: @{item()?['lastsuccessfulsynctime']} TimeSinceLastSync: @{div(sub(ticks(utcNow()), ticks(item()?['lastsuccessfulsynctime'])), 10000000)} 4. Create Dashboard Data: Compose - Dashboard Summary: TotalEntities: @{length(outputs('List_rows_-_Entity_States')?['body/value'])} HealthyEntities: @{length(where(variables('HealthChecks'), equals(item()?['IsHealthy'], true)))} ErrorEntities: @{length(where(variables('HealthChecks'), equals(item()?['IsHealthy'], false)))} LastUpdated: @{utcNow()} 5. Update Dashboard (SharePoint List or Power BI): Create item (SharePoint): List: "Synapse Link Health Dashboard" Title: "Health Check - @{formatDateTime(utcNow(), 'yyyy-MM-dd HH:mm')}" Summary: @{outputs('Compose_-_Dashboard_Summary')}
1. Get Historical Error Data: List rows (Dataverse): Table: synapselinkprofileentitystate Filter: modifiedon ge @{addDays(utcNow(), -7)} Order by: modifiedon desc Top count: 1000 2. Analyze Error Patterns: Apply to each - Error Records: Condition - Check for recurring errors: @contains(item()?['errormessage'], 'timeout') @contains(item()?['errormessage'], 'permission') @contains(item()?['errormessage'], 'storage') @contains(item()?['errormessage'], 'network') 3. Generate Pattern Report: Compose - Pattern Analysis: TimeoutErrors: @{length(where(variables('ErrorData'), contains(item()?['errormessage'], 'timeout')))} PermissionErrors: @{length(where(variables('ErrorData'), contains(item()?['errormessage'], 'permission')))} StorageErrors: @{length(where(variables('ErrorData'), contains(item()?['errormessage'], 'storage')))} NetworkErrors: @{length(where(variables('ErrorData'), contains(item()?['errormessage'], 'network')))} 4. Send Weekly Report: Send an email (V2): Subject: "Weekly Synapse Link Error Pattern Report" Body: [Formatted report with patterns and recommendations]
1. Analyze Error Type: Switch - Error Message: Case 'timeout': # Wait and retry Delay: PT5M Call: "Retry Sync Flow" Case 'permission': # Send alert to admin Send notification Case 'storage': # Check storage account status HTTP: GET Storage Account Status Default: # Log for manual review Create item in "Manual Review Queue" 2. Retry Logic: Do until - Success or Max Attempts: # Attempt to restart sync # Check if error is resolved # Increment retry counter 3. Log Recovery Attempt: Create item (Dataverse): Table: Custom "Recovery Log" Fields: EntityName, ErrorType, RecoveryAction, Success, Timestamp
Critical Fields: - syncstatus: Current sync status - statusreason: Detailed reason code - errormessage: Error description - lastsuccessfulsynctime: Last successful sync - modifiedon: Last status change - entityname: Entity being synced
Critical Fields: - runstatus: Individual run status - errormessage: Run-specific error message - errorcode: Structured error code - recordsprocessed: Number of records processed - recordsfailed: Number of failed records - starttime/endtime: Run duration
Primary Error States: - "Error" - General error state - "Failed" - Failed sync attempt - "Exception" - System exception occurred - "Stopped" - Sync stopped unexpectedly Warning States: - "Warning" - Partial success with issues - "Queued" - Stuck in queue (potential issue) - "Processing" - Long-running process (monitor for timeout)
syncstate = 1
statusreason
errormessage
synapselinkprofileentityrun
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Michael E. Gernaey 507 Super User 2025 Season 2
Tomac 267 Moderator
abm abm 232 Most Valuable Professional