SharedResources
Identifies all files and folders that have been shared from OneDrive, along with recipients and access levels.
Table Specific Information
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, Shared_Scope FROM SharedResources WHERE Id IN ('B1E6BJ084A9133KB1!122', 'APF9D2K6WFAAPX9')
SharedResources 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 shared resources in the 'Drive' no matter the depth they're located in.
Columns
| Name | Type | References | Description |
| id [KEY] | String | Unique identifier for the item in the system. | |
| Etag | String | Entity tag used for version control and detecting changes to the item. | |
| createdBy_user_id | String | Identifier of the user who originally created the item. | |
| createdBy_user_displayName | String | Display name of the user who created the item. | |
| lastModifiedBy_user_id | String | Identifier of the user who most recently modified the item. | |
| lastModifiedBy_user_displayName | String | Display name of the user who last modified the item. | |
| createdBy_application_displayName | String | Display name of the application that created the item. | |
| createdBy_application_id | String | Unique ID of the application that created the item. | |
| createdDateTime | Datetime | Timestamp indicating when the item was created. | |
| description | String | User-defined description or notes about the item. | |
| lastModifiedBy_application_displayName | String | Display name of the application that last modified the item. | |
| lastModifiedBy_application_id | String | Unique ID of the application that last modified the item. | |
| lastModifiedDateTime | Datetime | Timestamp of the most recent modification to the item. | |
| name | String | Name of the item (file or folder). | |
| parentReference_driveId | String | ID of the drive where the item's parent is located. | |
| parentReference_driveType | String | Type of drive hosting the item, such as personal or business. | |
| parentReference_id | String | ID of the parent folder or item. | |
| parentReference_name | String | Name of the parent folder or item. | |
| parentReference_path | String | Full path to the parent folder or item. | |
| parentReference_shareId | String | Sharing ID associated with the parent item for link-based sharing. | |
| parentReference_sharepointIds_listId | String | SharePoint list ID where the item resides. | |
| parentReference_sharepointIds_listItemId | String | Item ID in the SharePoint list for the parent item. | |
| parentReference_sharepointIds_listItemUniqueId | String | Globally unique ID for the SharePoint list item. | |
| parentReference_sharepointIds_siteId | String | SharePoint site ID that contains the parent item. | |
| parentReference_sharepointIds_siteUrl | String | URL of the SharePoint site hosting the item. | |
| parentReference_sharepointIds_tenantId | String | Tenant ID of the SharePoint organization. | |
| parentReference_sharepointIds_webId | String | Web ID of the SharePoint subsite containing the item. | |
| parentReference_siteId | String | ID of the parent site where the item is located. | |
| webUrl | String | Web-accessible URL to view or access the item. | |
| LinkedcreatedByUser | String | Link to metadata about the user who created the item. | |
| LinkedlastModifiedByUser | String | Link to metadata about the user who last modified the item. | |
| audio_album | String | Album title associated with the audio file. | |
| audio_albumArtist | String | Primary artist of the album. | |
| audio_artist | String | Performer or artist of the audio content. | |
| audio_bitrate | Long | Bitrate of the audio file in bits per second. | |
| audio_composers | String | Name of the composers for the audio content. | |
| audio_copyright | String | Copyright information associated with the audio file. | |
| audio_disc | Int | Disc number if the audio file is part of a multi-disc album. | |
| audio_discCount | Int | Total number of discs in the audio album. | |
| audio_duration | Long | Duration of the audio in milliseconds. | |
| audio_genre | String | Genre or category of the audio content. | |
| audio_hasDrm | Bool | Indicates whether the audio file is protected by DRM. | |
| audio_isVariableBitrate | Bool | Indicates whether the audio file uses variable bitrate encoding. | |
| audio_title | String | Title of the track within the audio file. | |
| audio_track | Int | Track number in the album or playlist. | |
| audio_trackCount | Int | Total number of tracks in the album. | |
| audio_year | Int | Year the audio content was released or created. | |
| content | String | Raw content of the item, usually encoded. | |
| cTag | String | Change tag used for sync operations to detect item changes. | |
| deleted_state | String | Status indicating if the item has been deleted (for example, deleted, notDeleted). | |
| file_hashes_crc32Hash | String | CRC32 hash for integrity verification of the file content. | |
| file_hashes_quickXorHash | String | QuickXor hash used by Microsoft to detect file content changes. | |
| file_hashes_sha1Hash | String | SHA-1 hash for validating file integrity. | |
| file_hashes_sha256Hash | String | SHA-256 hash for strong integrity verification of the file. | |
| file_mimeType | String | MIME type of the file. | |
| file_processingMetadata | Bool | Indicates whether additional processing metadata is present (such as for indexing). | |
| fileSystemInfo_createdDateTime | Datetime | Timestamp when the file was created in the file system. | |
| fileSystemInfo_lastAccessedDateTime | Datetime | Timestamp of the last time the file was accessed. | |
| fileSystemInfo_lastModifiedDateTime | Datetime | Timestamp when the file was last modified in the file system. | |
| folder_childCount | Int | Number of items contained in the folder. | |
| folder_view_sortBy | String | Default attribute used to sort items in the folder view. | |
| folder_view_sortOrder | String | Default sort order (ascending or descending) for the folder view. | |
| folder_view_viewType | String | Type of view for the folder, such as list, grid, or 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 item was created (for media files). | |
| location_latitude | Double | Latitude coordinate where the item was created. | |
| location_longitude | Double | Longitude coordinate where the item was created. | |
| package_type | String | Type of package or container, such as OneNote or ZIP. | |
| pendingOperations_pendingContentUpdate_queuedDateTime | Datetime | Timestamp indicating when a pending update was queued for processing. | |
| photo_cameraMake | String | Manufacturer of the camera used to take the photo. | |
| photo_cameraModel | String | Model name or number of the camera used. | |
| photo_exposureDenominator | Double | Denominator of the exposure time (for example, 1/125 → 125). | |
| photo_exposureNumerator | Double | Numerator of the exposure time. | |
| photo_fNumber | Double | Aperture value (f-number) used to take the photo. | |
| photo_focalLength | Double | Focal length of the lens, in millimeters. | |
| photo_iso | Int | ISO sensitivity setting used when the photo was taken. | |
| photo_orientation | Int | Orientation of the photo (for example, upright, rotated). | |
| photo_takenDateTime | Datetime | Date and time when the photo was taken, from metadata. | |
| publication_level | String | Level of publication assigned to the shared resource, used to define distribution or access tier. | |
| publication_versionId | String | Identifier representing the version of the published shared resource. | |
| remoteItem_createdBy_application_displayName | String | Display name of the application that created the shared remote item. | |
| remoteItem_createdBy_application_id | String | Application ID of the app that created the shared remote item. | |
| remoteItem_createdDateTime | Datetime | Timestamp indicating when the remote item was created. | |
| remoteItem_file_hashes_crc32Hash | String | CRC32 hash value of the file content, used for integrity checks. | |
| remoteItem_file_hashes_quickXorHash | String | QuickXor hash used by Microsoft services to detect changes in file content. | |
| remoteItem_file_hashes_sha1Hash | String | SHA-1 hash of the file for verifying content integrity. | |
| remoteItem_file_hashes_sha256Hash | String | SHA-256 hash of the file for secure content validation. | |
| remoteItem_file_mimeType | String | MIME type of the file, such as application/pdf, image/png, text/plain. | |
| remoteItem_file_processingMetadata | Bool | Indicates whether the file includes metadata for processing tasks such as indexing. | |
| remoteItem_fileSystemInfo_createdDateTime | Datetime | Filesystem timestamp showing when the file was initially created. | |
| remoteItem_fileSystemInfo_lastAccessedDateTime | Datetime | Timestamp showing the last time the file was accessed. | |
| remoteItem_fileSystemInfo_lastModifiedDateTime | Datetime | Timestamp showing the last modification to the file in the filesystem. | |
| remoteItem_folder_childCount | Int | Total number of child items contained within the shared folder. | |
| remoteItem_folder_view_sortBy | String | Default field used to sort items in the folder view, such as name or dateModified. | |
| remoteItem_folder_view_sortOrder | String | Sort direction used in the folder view, such as ascending or descending. | |
| remoteItem_folder_view_viewType | String | Type of folder view, such as list, grid, or thumbnails. | |
| remoteItem_id | String | Unique identifier of the shared remote item. | |
| remoteItem_image_height | Int | Image height in pixels for the shared item, if it is an image file. | |
| remoteItem_image_width | Int | Image width in pixels for the shared item, if it is an image file. | |
| remoteItem_lastModifiedDateTime | Datetime | Timestamp indicating the last time the remote item was modified. | |
| remoteItem_name | String | Name of the remote item that has been shared. | |
| remoteItem_package_type | String | Type of package, such as OneNote or ZIP, associated with the shared item. | |
| remoteItem_parentReference_driveId | String | Drive ID where the parent folder or item resides. | |
| remoteItem_parentReference_driveType | String | Drive type where the parent is located, such as personal, business, or documentLibrary. | |
| remoteItem_parentReference_id | String | ID of the parent item from which the remote item inherits. | |
| remoteItem_parentReference_name | String | Name of the parent item containing the remote item. | |
| remoteItem_parentReference_path | String | Path to the parent folder or item in the OneDrive hierarchy. | |
| remoteItem_parentReference_shareId | String | Sharing ID used to identify the parent folder in shared contexts. | |
| remoteItem_parentReference_sharepointIds_listId | String | ID of the SharePoint list containing the parent item. | |
| remoteItem_parentReference_sharepointIds_listItemId | String | ID of the SharePoint list item corresponding to the parent item. | |
| remoteItem_parentReference_sharepointIds_listItemUniqueId | String | Globally unique ID of the SharePoint list item for the parent. | |
| remoteItem_parentReference_sharepointIds_siteId | String | Site ID in SharePoint where the parent item is located. | |
| remoteItem_parentReference_sharepointIds_siteUrl | String | URL of the SharePoint site containing the parent item. | |
| remoteItem_parentReference_sharepointIds_tenantId | String | Tenant ID associated with the SharePoint site. | |
| remoteItem_parentReference_sharepointIds_webId | String | Web ID of the SharePoint site or subsite where the item exists. | |
| remoteItem_parentReference_siteId | String | Site ID of the location where the shared resource resides. | |
| remoteItem_shared_scope | String | Defines the access scope of the shared item, such as anonymous, organization, or users. | |
| remoteItem_shared_sharedDateTime | Datetime | Timestamp indicating when the item was shared. | |
| remoteItem_size | Long | Size of the shared resource in bytes. | |
| remoteItem_specialFolder_name | String | Indicates whether the folder is a special system folder, such as Documents or Photos. | |
| remoteItem_video_audioBitsPerSample | Int | Bit depth per audio sample in the video file. | |
| remoteItem_video_audioChannels | Int | Number of audio channels in the video, such as 1 for mono or 2 for stereo. | |
| remoteItem_video_audioFormat | String | Format or codec used for the audio track in the video. | |
| remoteItem_video_audioSamplesPerSecond | Int | Audio sampling rate in Hertz for the video file. | |
| remoteItem_video_bitrate | Int | Total bitrate of the video in bits per second. | |
| remoteItem_video_duration | Long | Total duration of the video in milliseconds. | |
| remoteItem_video_fourCC | String | Four-character code (FourCC) that identifies the video codec. | |
| remoteItem_video_frameRate | Double | Frame rate of the video, expressed as frames per second. | |
| remoteItem_video_height | Int | Height of the video frame in pixels. | |
| remoteItem_video_width | Int | Width of the video frame in pixels. | |
| remoteItem_webDavUrl | String | WebDAV-compatible URL for programmatic access to the remote item. | |
| remoteItem_webUrl | String | Public-facing web URL for accessing the shared item. | |
| searchResult_onClickTelemetryUrl | String | URL used for collecting telemetry when a shared item is clicked in search results. | |
| shared_owner_application_displayName | String | Name of the application that owns the shared item. | |
| shared_owner_application_id | String | Application ID of the application that owns the shared item. | |
| shared_scope | String | Scope of sharing defined for the resource, such as anonymous, organization, or specific users. | |
| shared_sharedDateTime | Datetime | Timestamp indicating when the sharing action took place. | |
| sharepointIds_listId | String | Identifier for the SharePoint list containing the shared item. | |
| sharepointIds_listItemId | String | Item ID within the SharePoint list. | |
| sharepointIds_listItemUniqueId | String | Globally unique identifier for the SharePoint list item. | |
| sharepointIds_siteId | String | ID of the SharePoint site hosting the shared resource. | |
| sharepointIds_siteUrl | String | URL of the SharePoint site where the item resides. | |
| sharepointIds_tenantId | String | Identifier of the Microsoft 365 tenant for the SharePoint environment. | |
| sharepointIds_webId | String | ID of the web component in the SharePoint site structure. | |
| size | Long | Size of the shared resource in bytes. | |
| specialFolder_name | String | Name of the special folder if applicable, such as Music, Photos, or Videos. | |
| video_audioBitsPerSample | Int | Bit depth for audio samples in standalone video metadata. | |
| video_audioChannels | Int | Audio channel count in the video (standalone representation). | |
| video_audioFormat | String | Audio codec or format used in standalone video metadata. | |
| video_audioSamplesPerSecond | Int | Sampling rate of audio in standalone video metadata. | |
| video_bitrate | Int | Bitrate of the standalone video in bits per second. | |
| video_duration | Long | Duration of the standalone video in milliseconds. | |
| video_fourCC | String | FourCC used in standalone video metadata to represent the codec. | |
| video_frameRate | Double | Frame rate of the standalone video in frames per second. | |
| video_height | Int | Video height in pixels (standalone metadata). | |
| video_width | Int | Video width in pixels (standalone metadata). | |
| webDavUrl | String | WebDAV endpoint URL for accessing the shared item using WebDAV clients. | |
| Linkedanalytics | String | Link to analytics data related to the shared item, such as views or edits. | |
| Linkedchildren | String | Link to the list of child items within a shared folder. | |
| LinkedlistItem | String | Link to the corresponding SharePoint list item for the shared content. | |
| Linkedpermissions | String | Link to permission settings associated with the shared resource. | |
| Linkedsubscriptions | String | Link to any active subscriptions (such as webhooks) related to the shared item. | |
| Linkedthumbnails | String | Link to thumbnail images associated with the shared item. | |
| Linkedversions | String | Link to the version history of the shared item. | |
| Linkedworkbook | String | Link to the Excel workbook interface if the shared item is an Excel file. |