Folders
Lists all folders within a OneDrive drive, useful for navigation and hierarchical organization analysis.
Table Specific Information
Note: See CreateFolder to create a folder.
Projection is done server-side. Also, queries that include the primary key Id and IN are executed server-side, e.g.:
SELECT Id, Name, Size, Description FROM Folders WHERE Id IN ('B1E6BJ084A9133KB1!122', 'APF9D2K6WFAAPX9')
Folder listing is done recursively via the DirectoryRetrievalDepth property. This property's default value is 5, which means it will get data only for the first 6 levels of the 'Drive' you've chosen (because the first level is located in DirectoryRetrievalDepth=0).
You can specify the value -1 to get all the folders in the 'Drive' no matter the depth they're located in.
While folders may be listed in this view, the contents of the folders may be worked with by using stored procedures such as:
- CopyResource - Copy a file/folder from one directory in your drive to another.
- DeleteResource - Delete a file/folder from your drive.
- MoveResource - Move a file/folder from one directory in your drive to another.
Columns
| Name | Type | References | Description |
| id [KEY] | String | Unique identifier for the item. | |
| Etag | String | Entity tag for the item used for concurrency control. | |
| createdBy_user_id | String | ID of the user who created the item. | |
| createdBy_user_displayName | String | Display name of the user who created the item. | |
| lastModifiedBy_user_id | String | ID of the user who last modified the item. | |
| lastModifiedBy_user_displayName | String | Display name of the user who last modified the item. | |
| createdBy_application_displayName | String | Name of the application that created the item. | |
| createdBy_application_id | String | ID of the application that created the item. | |
| createdDateTime | Datetime | Timestamp when the item was created. | |
| description | String | User-provided description of the item. | |
| lastModifiedBy_application_displayName | String | Name of the application that last modified the item. | |
| lastModifiedBy_application_id | String | ID of the application that last modified the item. | |
| lastModifiedDateTime | Datetime | Timestamp of the last modification to the item. | |
| name | String | Name of the item (file or folder). | |
| parentReference_driveId | String | ID of the drive containing the parent item. | |
| parentReference_driveType | String | Type of the drive (for example, personal, or business). | |
| parentReference_id | String | ID of the parent item. | |
| parentReference_name | String | Name of the parent item. | |
| parentReference_path | String | Path to the parent item. | |
| parentReference_shareId | String | Sharing ID associated with the parent item. | |
| parentReference_sharepointIds_listId | String | SharePoint list ID associated with the parent item. | |
| parentReference_sharepointIds_listItemId | String | SharePoint list item ID for the parent item. | |
| parentReference_sharepointIds_listItemUniqueId | String | Unique SharePoint list item ID. | |
| parentReference_sharepointIds_siteId | String | ID of the SharePoint site. | |
| parentReference_sharepointIds_siteUrl | String | URL of the SharePoint site. | |
| parentReference_sharepointIds_tenantId | String | Tenant ID for the SharePoint organization. | |
| parentReference_sharepointIds_webId | String | Web ID of the SharePoint site. | |
| parentReference_siteId | String | ID of the parent site (OneDrive/SharePoint). | |
| webUrl | String | URL to access the item in a web browser. | |
| LinkedcreatedByUser | String | Link to the user entity that created the item. | |
| LinkedlastModifiedByUser | String | Link to the user entity that last modified the item. | |
| audio_album | String | Album title of the audio file. | |
| audio_albumArtist | String | Primary artist of the album. | |
| audio_artist | String | Performer of the audio content. | |
| audio_bitrate | Long | Bitrate of the audio in bits per second. | |
| audio_composers | String | Composer(s) of the audio content. | |
| audio_copyright | String | Copyright statement for the audio file. | |
| audio_disc | Int | Disc number of the audio track. | |
| audio_discCount | Int | Total number of discs in the album. | |
| audio_duration | Long | Duration of the audio file in milliseconds. | |
| audio_genre | String | Genre of the audio content. | |
| audio_hasDrm | Bool | Indicates whether the audio file has digital rights management (DRM). | |
| audio_isVariableBitrate | Bool | Indicates whether the audio uses variable bitrate encoding. | |
| audio_title | String | Title of the audio track. | |
| audio_track | Int | Track number on the album. | |
| audio_trackCount | Int | Total number of tracks in the album. | |
| audio_year | Int | Year the audio was released. | |
| content | String | Base64 or encoded content of the item. | |
| cTag | String | Change tag used for item versioning and sync detection. | |
| deleted_state | String | The deletion status (for example, 'deleted', 'restored'). | |
| file_hashes_crc32Hash | String | CRC32 hash of the file content. | |
| file_hashes_quickXorHash | String | QuickXor hash of the file content used by OneDrive. | |
| file_hashes_sha1Hash | String | SHA-1 hash of the file content. | |
| file_hashes_sha256Hash | String | SHA-256 hash of the file content. | |
| file_mimeType | String | MIME type of the file (for example, 'application/pdf'). | |
| file_processingMetadata | Bool | Indicates whether the file has additional processing metadata (for example, indexing). | |
| fileSystemInfo_createdDateTime | Datetime | Timestamp when the file was created in the file system. | |
| fileSystemInfo_lastAccessedDateTime | Datetime | Timestamp of the last access to the file. | |
| fileSystemInfo_lastModifiedDateTime | Datetime | Timestamp when the file was last modified. | |
| folder_childCount | Int | Number of items (files/folders) in the folder. | |
| folder_view_sortBy | String | Default sort field for viewing folder contents. | |
| folder_view_sortOrder | String | Default sort order (ascending/descending) for folder contents. | |
| folder_view_viewType | String | Type of view used to display the folder contents (for example, thumbnails). | |
| image_height | Int | Height of the image in pixels. | |
| image_width | Int | Width of the image in pixels. | |
| location_altitude | Double | Altitude (in meters) where the file (typically a photo) was created. | |
| location_latitude | Double | Latitude coordinate for the file's location. | |
| location_longitude | Double | Longitude coordinate for the file's location. | |
| package_type | String | Type of package (for example, OneNote, ZIP). | |
| pendingOperations_pendingContentUpdate_queuedDateTime | Datetime | Timestamp when a pending update was queued. | |
| photo_cameraMake | String | Camera manufacturer used to take the photo. | |
| photo_cameraModel | String | Camera model used to take the photo. | |
| photo_exposureDenominator | Double | Denominator of the exposure time (for example, 1/60s = 60). | |
| photo_exposureNumerator | Double | Numerator of the exposure time. | |
| photo_fNumber | Double | F-number (aperture) used to take the photo. | |
| photo_focalLength | Double | Focal length of the lens used in millimeters. | |
| photo_iso | Int | ISO sensitivity used when taking the photo. | |
| photo_orientation | Int | Orientation of the photo (for example, 1 = normal, 3 = upside down). | |
| photo_takenDateTime | Datetime | Timestamp when the photo was taken. | |
| publication_level | String | The publication level for the folder, which can define sharing or access visibility. | |
| publication_versionId | String | Identifier representing the specific publication version of the folder. | |
| remoteItem_createdBy_application_displayName | String | Display name of the application that created the remote item. | |
| remoteItem_createdBy_application_id | String | Unique identifier of the application that created the remote item. | |
| remoteItem_createdDateTime | Datetime | Timestamp when the remote item was initially created. | |
| remoteItem_file_hashes_crc32Hash | String | CRC32 checksum used for file integrity verification. | |
| remoteItem_file_hashes_quickXorHash | String | QuickXor hash used by OneDrive to track file content changes. | |
| remoteItem_file_hashes_sha1Hash | String | SHA-1 hash of the file used for content validation. | |
| remoteItem_file_hashes_sha256Hash | String | SHA-256 hash of the file used for secure integrity checking. | |
| remoteItem_file_mimeType | String | MIME type of the file, such as application/pdf or image/jpeg. | |
| remoteItem_file_processingMetadata | Bool | Indicates whether the file contains processing metadata such as indexing or tagging. | |
| remoteItem_fileSystemInfo_createdDateTime | Datetime | Date and time when the file was created in the filesystem. | |
| remoteItem_fileSystemInfo_lastAccessedDateTime | Datetime | Date and time the file was last accessed in the filesystem. | |
| remoteItem_fileSystemInfo_lastModifiedDateTime | Datetime | Last modification timestamp of the file within the filesystem. | |
| remoteItem_folder_childCount | Int | Number of child items contained in the folder. | |
| remoteItem_folder_view_sortBy | String | Default attribute used to sort items in the folder view. | |
| remoteItem_folder_view_sortOrder | String | Sorting order (ascending or descending) used in the folder view. | |
| remoteItem_folder_view_viewType | String | Type of view used for displaying the folder, such as list or thumbnails. | |
| remoteItem_id | String | Unique identifier of the remote item. | |
| remoteItem_image_height | Int | Height of the image in pixels. | |
| remoteItem_image_width | Int | Width of the image in pixels. | |
| remoteItem_lastModifiedDateTime | Datetime | Timestamp of the last change made to the remote item. | |
| remoteItem_name | String | Name of the remote item (file or folder). | |
| remoteItem_package_type | String | Type of package the item belongs to, such as OneNote or ZIP. | |
| remoteItem_parentReference_driveId | String | Drive ID of the item's parent directory. | |
| remoteItem_parentReference_driveType | String | Type of drive hosting the item, such as personal or business. | |
| remoteItem_parentReference_id | String | Identifier of the parent folder or item. | |
| remoteItem_parentReference_name | String | Name of the parent folder or item. | |
| remoteItem_parentReference_path | String | Full path to the parent item in the drive. | |
| remoteItem_parentReference_shareId | String | ID associated with shared access to the parent item. | |
| remoteItem_parentReference_sharepointIds_listId | String | SharePoint list ID related to the parent item. | |
| remoteItem_parentReference_sharepointIds_listItemId | String | Item ID within a SharePoint list. | |
| remoteItem_parentReference_sharepointIds_listItemUniqueId | String | Globally unique identifier (GUID) for the SharePoint list item. | |
| remoteItem_parentReference_sharepointIds_siteId | String | SharePoint site ID where the item is located. | |
| remoteItem_parentReference_sharepointIds_siteUrl | String | URL of the SharePoint site hosting the item. | |
| remoteItem_parentReference_sharepointIds_tenantId | String | Tenant ID of the SharePoint organization. | |
| remoteItem_parentReference_sharepointIds_webId | String | Web ID for the SharePoint subsite. | |
| remoteItem_parentReference_siteId | String | Site ID associated with the parent folder or item. | |
| remoteItem_shared_scope | String | The scope of the shared item, such as organization or anonymous. | |
| remoteItem_shared_sharedDateTime | Datetime | Date and time when the item was shared. | |
| remoteItem_size | Long | Size of the item in bytes. | |
| remoteItem_specialFolder_name | String | Indicates whether the folder is special, such as Documents or Photos. | |
| remoteItem_video_audioBitsPerSample | Int | Number of audio bits per sample in the video file. | |
| remoteItem_video_audioChannels | Int | Number of audio channels (for example, mono, stereo) in the video. | |
| remoteItem_video_audioFormat | String | Format of the audio encoding in the video. | |
| remoteItem_video_audioSamplesPerSecond | Int | Sample rate of audio in the video, measured in Hz. | |
| remoteItem_video_bitrate | Int | Bitrate of the video file in bits per second. | |
| remoteItem_video_duration | Long | Duration of the video in milliseconds. | |
| remoteItem_video_fourCC | String | Four-character code (FourCC) identifying the video codec. | |
| remoteItem_video_frameRate | Double | Frame rate of the video in frames per second. | |
| remoteItem_video_height | Int | Video height in pixels. | |
| remoteItem_video_width | Int | Video width in pixels. | |
| remoteItem_webDavUrl | String | WebDAV-compliant URL to access the remote item programmatically. | |
| remoteItem_webUrl | String | Web URL to view the remote item in a browser. | |
| searchResult_onClickTelemetryUrl | String | URL used for telemetry tracking when a search result is clicked. | |
| shared_owner_application_displayName | String | Display name of the application that owns the shared item. | |
| shared_owner_application_id | String | ID of the application that owns the shared item. | |
| shared_scope | String | Scope of sharing for the item, such as users, organization, or anonymous. | |
| shared_sharedDateTime | Datetime | Date and time when the item was shared by the owner. | |
| sharepointIds_listId | String | Identifier for the SharePoint list. | |
| sharepointIds_listItemId | String | Item ID in the associated SharePoint list. | |
| sharepointIds_listItemUniqueId | String | GUID for the SharePoint list item. | |
| sharepointIds_siteId | String | SharePoint site ID where the item resides. | |
| sharepointIds_siteUrl | String | URL of the SharePoint site. | |
| sharepointIds_tenantId | String | ID of the SharePoint tenant. | |
| sharepointIds_webId | String | Identifier of the SharePoint web object. | |
| size | Long | Size of the item in bytes. | |
| specialFolder_name | String | Type of special folder, such as Documents, Music, or Photos. | |
| video_audioBitsPerSample | Int | Audio depth per sample in the video file. | |
| video_audioChannels | Int | Number of audio channels in the video (for example, 2 for stereo). | |
| video_audioFormat | String | Audio codec format used in the video. | |
| video_audioSamplesPerSecond | Int | Audio sample rate in Hz. | |
| video_bitrate | Int | Total bitrate of the video file. | |
| video_duration | Long | Length of the video in milliseconds. | |
| video_fourCC | String | Codec identifier (FourCC) used for the video stream. | |
| video_frameRate | Double | Video frame rate in frames per second. | |
| video_height | Int | Height resolution of the video. | |
| video_width | Int | Width resolution of the video. | |
| webDavUrl | String | WebDAV URL for accessing the item via file system protocols. | |
| Linkedanalytics | String | Link to analytics data related to the folder or item. | |
| Linkedchildren | String | Link to the child items contained within the folder. | |
| LinkedlistItem | String | Link to the associated SharePoint list item. | |
| Linkedpermissions | String | Link to the permissions set on the item. | |
| Linkedsubscriptions | String | Link to any active subscriptions (for example, webhooks) on the item. | |
| Linkedthumbnails | String | Link to thumbnail previews for the item. | |
| Linkedversions | String | Link to version history for the file. | |
| Linkedworkbook | String | Link to the Excel workbook interface if the file is an Excel document. |