Hi Peter Bons,
The best way to determine if a folder is synchronized with services such as OneDrive, Drive or Dropbox, is to use the API or SDK that they provide.
For OneDrive: You can use the Microsoft Graph API to retrieve the folder metadata and check if the remoteItem property includes fileSystemInfo with the lastModifiedBy property representing OneDrive.
For Google drive: you can use the Google Drive API. Perform a Files: list request to retrieve the folder metadata. Check if the ownedByMe field is true, which indicates that the folder is synchronized with Google Drive.
For Dropbox: you must use the Dropbox API. Make a files/get_metadata request to retrieve the folder's metadata. Check if the sharing_info field is present, indicating that the folder is synchronized with Dropbox.
Regards,