Skip to content

File & folder access

OneDrive sync client

OneDrive cheat sheet: account registry keys, SyncEngineDatabase.db and <CID>.dat metadata, ODL logs, SafeDelete.db, Files On-Demand and how to parse them.

Location
C:\Users\<user>\AppData\Local\Microsoft\OneDrive\
Proves
Which cloud account was linked and which files synced, uploaded or deleted
Timestamps
Sync DB lastChange and SafeDelete notificationTime as Unix epoch, UTC; ODL log entry times; account key LastWrite as FILETIME, UTC
Retention
Sync database rewritten continuously, removed items vanish; ODL logs rotate and compress with limited history; keys often survive unlinking
Access
User profile files; databases open while OneDrive runs: stop it or copy via VSS; keep general.keystore to decrypt ODL logs
Type
File / file system
Windows
1011
KAPE target
OneDrive_MetadataCloudStorage_OneDriveExplorer
Velociraptor
Windows.Triage.Targets:OneDrive_MetadataCloudStorage_OneDriveExplorer

What it is

OneDrive is built into Windows 10 and 11 and is the default place where Microsoft 365 users keep documents. The sync client (OneDrive.exe) runs per user and records three kinds of evidence: account configuration in the user's registry, a metadata database describing every file and folder it knows about (including files that exist only in the cloud), and detailed binary logs of its operations.

This makes OneDrive a key source for data-theft cases: it shows which personal or business account was linked, what was synced to the machine, and when files were uploaded, downloaded or deleted.

Location

ItemPathNotes
Account configurationNTUSER.DAT\Software\Microsoft\OneDrive\Accounts\Personal and ...\Accounts\Business1 (Business2…)UserFolder, UserEmail, cid/UserCid; Tenants subkeys list synced libraries and shared folders
Settings%LOCALAPPDATA%\Microsoft\OneDrive\settings\Personal\ and settings\Business1\<CID>.ini, <CID>.dat and <CID>.dat.previous (older clients)
Sync databasesettings\<account>\SyncEngineDatabase.dbSQLite, used by current clients instead of <CID>.dat
Deletion databasesettings\<account>\SafeDelete.dbSQLite, items the client sent to the Recycle Bin
Logs%LOCALAPPDATA%\Microsoft\OneDrive\logs\Common\, logs\Personal\, logs\Business1\.odl, .odlgz, .odlsent, .aodl; general.keystore for decrypting obfuscated strings
Synced files%USERPROFILE%\OneDrive\ or %USERPROFILE%\OneDrive - <Organisation>\Real path is in UserFolder

What it proves

  • Account link: which Microsoft account (e-mail, CID) or tenant was connected under this Windows user, and where it synced.
  • Cloud inventory: names, sizes, hashes and status of files and folders in the account, even those never downloaded (Files On-Demand placeholders).
  • Activity: ODL logs record uploads, downloads, renames, deletions and sync sessions.
  • Deletions: SafeDelete.db and the Recycle Bin show files the client deleted locally.
  • It does not show activity performed only on the web (OneDrive in a browser) or on another device, except as changes that later synced down. Use Microsoft 365 audit logs for that.

Key fields

SourceFieldMeaning
Registry Accounts\<account>UserFolderLocal root of the synced folder
Registry Accounts\<account>UserEmail, cid/UserCidAccount identity; the CID also names the settings files
SyncEngineDatabase.db → od_ClientFile_RecordsfileName, resourceID, size, lastChange, fileStatus, sharedItem, localHashDigestOne row per file; fileStatus distinguishes local, online-only and excluded files
SyncEngineDatabase.db → od_ClientFolder_RecordsfolderName, resourceID, folderStatusFolder tree
SyncEngineDatabase.db → od_GraphMetadata_RecordsCreated by / modified byWho created and last modified the file in the cloud
SyncEngineDatabase.db → od_HydrationDataFirst hydrationWhen an online-only file was first downloaded to the device
SafeDelete.db → items_sent_to_recycle_binitemName, notificationTimeDeleted item and when it was sent to the Recycle Bin
ODL log entriesTimestamp, code file, function, parametersOperation-level trace of the client

Timestamps

TimestampSet whenFormatPitfalls
lastChange (od_ClientFile_Records)Last change the client recorded for the itemUnix epoch, UTCReflects sync state, not necessarily the user's edit time
notificationTime (SafeDelete.db)Item sent to the Recycle Bin by the clientUnix epoch, UTCPair with the $I file in the Recycle Bin
ODL entry timeLog line writtenStored in each entryLogs roll over and older files are compressed to .odlgz; check the time zone your parser applies
Key last write timeAccount key updatedFILETIME, UTCUpdated whenever the client writes to the key, not only at sign-in
Placeholder file timesSync from cloudNTFS, UTCDates may come from the cloud copy, not local activity

Retention and clearing

  • The sync database is rewritten continuously; removed items disappear from it, so keep older copies from volume shadow copies.
  • ODL logs rotate and are compressed; only a limited history is kept on disk.
  • Since around April 2022, sensitive strings in ODL logs are AES-encrypted with the key in general.keystore (older versions used an ObfuscationStringMap.txt dictionary). Collect the keystore with the logs.
  • Unlinking the account or uninstalling OneDrive removes much of settings\; registry keys and logs often survive. Signing out does not delete synced files.
  • Files On-Demand (Windows 10 1709+) means a file visible in the folder may never have been on the disk; check fileStatus or hydration data before claiming the user had a local copy.

Collection

  • KAPE target: OneDrive_Metadata (the whole %LOCALAPPDATA%\Microsoft\OneDrive folder); CloudStorage_OneDriveExplorer adds RegistryHivesUser and RecycleBin for OneDriveExplorer. OneDrive_UserFiles collects the synced files themselves.
  • Velociraptor (Windows.Triage.Targets): OneDrive_Metadata, CloudStorage_OneDriveExplorer.
  • Built-in: stop OneDrive or copy from a shadow copy (the databases are open while it runs).
robocopy C:\Users\alice\AppData\Local\Microsoft\OneDrive E:\case\OneDrive /E /COPY:DAT
reg query "HKU\<SID>\Software\Microsoft\OneDrive\Accounts" /s

Parsing tools

  • OneDriveExplorer (Brian Maloney, open source): rebuilds the OneDrive folder tree from <CID>.dat or SyncEngineDatabase.db, adds registry, Recycle Bin and ODL log data, and exports CSV, JSON or HTML.
  • odl.py (Yogesh Khatri, open source): parses .odl, .odlgz, .odlsent and .aodl logs and decrypts strings with general.keystore or deobfuscates them with the older string map.
  • Registry Explorer / RECmd (Eric Zimmerman): review the OneDrive\Accounts keys in NTUSER.DAT.
  • DB Browser for SQLite: query SyncEngineDatabase.db and SafeDelete.db directly.

Investigation tips

  • A personal account (Accounts\Personal) on a corporate laptop is a classic exfiltration channel: list its files and search the ODL logs for uploads in the relevant window.
  • Correlate uploads with SRUM bytes sent by OneDrive.exe and with the USN journal entries for files copied into the sync folder.
  • Online-only files carry cloud metadata; use od_HydrationData to show when one was first opened on this device.
  • Mass deletions in SafeDelete.db and the Recycle Bin can point to anti-forensics or ransomware activity.
  • Check the web side too: browser artifacts show OneDrive or SharePoint access in a browser, and Microsoft 365 audit logs cover activity from other devices.

Related artifacts

Glossary terms

All artifacts on one page: cheat sheet