Microsoft Graph Files

Overview


Microsoft Graph lets your app get an authorized access to files in OneDrive, SharePoint and MS Teams across all organization. (requires admin consent). This integration was integrated and tested with version xx of Microsoft_Graph_Files

Authentication


For more details about the authentication used in this integration, see Microsoft Integrations - Authentication.

Required Permissions

  1. Directory.Read.All - Delegated
  2. Files.ReadWrite.All - Application
  3. Files.ReadWrite.All - Delegated
  4. Sites.ReadWrite.All - Application
  5. Sites.ReadWrite.All - Delegated
  6. User.Read - Delegated

Configure Microsoft Graph Files on Demisto

  1. Navigate to Settings > Integrations > Servers & Services.
  2. Search for Microsoft_Graph_Files.
  3. Click Add instance to create and configure a new integration instance.
    • Name: a textual name for the integration instance.
    • Server URL
    • ID (received from the admin consent - see Detailed Instructions)
    • Token (received from the admin consent - see Detailed Instructions)
    • Key (received from the admin consent - see Detailed Instructions)
    • Trust any certificate (not secure)
    • Use system proxy settings
  4. Click Test to validate the URLs, token, and connection.

Commands


You can execute these commands from the Demisto CLI, as part of an automation, or in a playbook. After you successfully execute a command, a DBot message appears in the War Room with the command details.

  1. msgraph-delete-file
  2. msgraph-upload-new-file
  3. msgraph-replace-existing-file
  4. msgraph-create-new-folder
  5. msgraph-list-drives-in-site
  6. msgraph-list-drive-content
  7. msgraph-list-share-point-sites
  8. msgraph-download-file

1. msgraph-delete-file


Delete a DriveItem by using its ID

Required Permissions
Files.ReadWrite.All
Base Command

msgraph-delete-file

Input
Argument NameDescriptionRequired
object_typeMS Graph resource.Required
object_type_idMS Graph resource id.Required
item_idMs Graph item_id.Required
Context Output

There is no context output for this command.

Command Example

!msgraph-delete-file object_type=drives object_type_id=test item_id=test

Human Readable Output

MsGraphFiles - File information:

123
Item was deleted successfully

2. msgraph-upload-new-file


Uploads a file from Demisto to MS Graph resource

Required Permissions
Files.ReadWrite.All
Base Command

msgraph-upload-new-file

Input
Argument NameDescriptionRequired
object_typeMS Graph resource.Required
object_type_idMS Graph resource id.Required
parent_idAn ID of the folder to upload the file to.Required
file_nameA file name for the uploaded file.Required
entry_idDesmito entry ID of the fileRequired
Context Output
PathTypeDescription
MsGraphFiles.UploadedFiles.ParentReference.DriveIdStringUnique identifier of the drive that contains the item.
MsGraphFiles.UploadedFiles.ParentReference.DriveTypeStringIdentifies the type of drive.
MsGraphFiles.UploadedFiles.ParentReference.IDStringUnique identifier of the item in the drive.
MsGraphFiles.UploadedFiles.ParentReference.PathStringPath to navigate to the item
MsGraphFiles.UploadedFiles.LastModifiedDateTimeStringDate and time that the item was last modified.
MsGraphFiles.UploadedFiles.File.MimeTypeStringFile type
MsGraphFiles.UploadedFiles.File.HashesStringHash type
MsGraphFiles.UploadedFiles.CreatedDateTimeStringTimestamp of item creation.
MsGraphFiles.UploadedFiles.WebUrlStringURL to the resource in the browser
MsGraphFiles.UploadedFiles.OdataContextStringOData query
MsGraphFiles.UploadedFiles.FileSystemInfo.CreatedDateTimeStringThe date and time the item was created on a client.
MsGraphFiles.UploadedFiles.FileSystemInfo.LastModifiedDateTimeStringThe date and time the item was last modified on a client.
MsGraphFiles.UploadedFiles.LastModifiedBy.DisplayNameStringThe item display name
MsGraphFiles.UploadedFiles.LastModifiedBy.TypeStringApplication, user or device
MsGraphFiles.UploadedFiles.CreatedBy.DisplayNameStringIdentity of the user, device,or application which created the item
MsGraphFiles.UploadedFiles.CreatedBy.IDStringThe ID of the creator
MsGraphFiles.UploadedFiles.CreatedBy.TypeStringApplication, user or device
MsGraphFiles.UploadedFiles.DownloadUrlStringURL to download this file's content
MsGraphFiles.UploadedFiles.SizeNumberFile's size
MsGraphFiles.UploadedFiles.IDStringFile ID
MsGraphFiles.UploadedFiles.NameStringThe file's name
MsGraph.UploadedFiles.FileStringGraph's file object
Command Example

!msgraph-upload-new-file object_type=drives object_type_id=123 parent_id=123 file_name="test.txt" entry_id=123

Context Example
{
"MsGraphFiles.UploadedFiles": {
"ParentReference": {
"DriveId": "test",
"DriveType": "documentLibrary",
"ID": "test",
"Path": "test"
},
"LastModifiedBy": {
"Type": "Application",
"DisplayName": "Microsoft Graph",
"ID": "test"
},
"LastModifiedDateTime": "2020-01-22T20:03:00Z",
"CreatedBy": {
"Type": "Application",
"DisplayName": "Microsoft Graph",
"ID": "test"
},
"CreatedDateTime": "2020-01-22T20:03:00Z",
"WebUrl": "test",
"FileSystemInfo": {
"CreatedDateTime": "2020-01-22T20:03:00Z",
"LastModifiedDateTime": "2020-01-22T20:03:00Z"
},
"DownloadUrl": "test",
"File": {
"MimeType": "text/plain",
"Hashes": {
"QuickXorHash": "test"
}
},
"OdataContext": "test",
"Size": 15,
"ID": "test",
"Name": "test.txt"
}
}
Human Readable Output

MsGraphFiles - File information:

CreatedByCreatedDateTimeIDLastModifiedByNameSizeWebUrl
Microsoft Graph2020-01-22T20:03:00ZTestMicrosoft Graphtest.txt15Test

3. msgraph-replace-existing-file


Replace file context in MS Graph resource

Required Permissions
Files.ReadWrite.All
Sites.ReadWrite.All
Base Command

msgraph-replace-existing-file

Input
Argument NameDescriptionRequired
object_typeMS Graph resource.Required
object_type_idMS Graph resource id.Required
item_idMs Graph item_id.Required
entry_idDemisto file entry id.Required
Context Output
PathTypeDescription
MsGraphFiles.ReplacedFiles.ParentReference.DriveIdStringUnique identifier of the drive that contains the item.
MsGraphFiles.ReplacedFiles.ParentReference.DriveTypeStringIdentifies the type of drive.
MsGraphFiles.ReplacedFiles.ParentReference.IDStringUnique identifier of the item in the drive.
MsGraphFiles.ReplacedFiles.ParentReference.PathStringPath to navigate to the item
MsGraphFiles.ReplacedFiles.LastModifiedDateTimeDateDate and time that the item was last modified.
MsGraphFiles.ReplacedFiles.File.MimeTypeStringFile type
MsGraphFiles.ReplacedFiles.File.HashesStringHash type
MsGraphFiles.ReplacedFiles.CreatedDateTimeStringTimestamp of item creation
MsGraphFiles.ReplacedFiles.WebUrlStringURL to the resource in the browser
MsGraphFiles.ReplacedFiles.OdataContextStringOData query
MsGraphFiles.ReplacedFiles.FileSystemInfo.CreatedDateTimeDateThe date and time the item was created on a client
MsGraphFiles.ReplacedFiles.FileSystemInfo.LastModifiedDateTimeDateThe date and time the item was last modified on a client
MsGraphFiles.ReplacedFiles.LastModifiedBy.DisplayNameStringThe item display name
MsGraphFiles.ReplacedFiles.LastModifiedBy.IDStringIdentity of the application which last modified the item
MsGraphFiles.ReplacedFiles.CreatedBy.DisplayNameStringIdentity of the user, device,or application which created the item
MsGraphFiles.ReplacedFiles.CreatedBy.IDStringThe ID of the creator
MsGraphFiles.ReplacedFiles.CreatedBy.TypeStringApplication, user or device
MsGraphFiles.ReplacedFiles.DownloadUrlStringURL to download the file's content
MsGraphFiles.ReplacedFiles.SizeNumberFile's size
MsGraphFiles.ReplacedFiles.IdStringFile ID
MsGraphFiles.ReplacedFiles.NameStringThe file's name
MsGraphFiles.ReplacedFiles.FileStringGraph's file object
Command Example

!msgraph-replace-existing-file object_type=drives entry_id=test item_id=test object_type_id=test

Context Example
{
"MsGraphFiles.ReplacedFiles": {
"ParentReference": {
"DriveId": "test",
"DriveType": "documentLibrary",
"ID": "test",
"Path": "test"
},
"LastModifiedBy": {
"Type": "Application",
"DisplayName": "Microsoft Graph",
"ID": "test"
},
"LastModifiedDateTime": "2020-01-22T20:03:06Z",
"CreatedBy": {
"Type": "Application",
"DisplayName": "SharePoint DEV",
"ID": "test"
},
"CreatedDateTime": "2020-01-05T15:30:21Z",
"WebUrl": "test",
"FileSystemInfo": {
"CreatedDateTime": "2020-01-05T15:30:21Z",
"LastModifiedDateTime": "2020-01-22T20:03:06Z"
},
"DownloadUrl": "test",
"File": {
"MimeType": "text/plain",
"Hashes": {
"QuickXorHash": "test"
}
},
"OdataContext": "test",
"Size": 15,
"ID": "test",
"Name": "test.txt"
}
}
Human Readable Output

MsGraphFiles - File information:

Created ByCreated Date TimeIDLast Modified ByNameSizeWeb Url
SharePoint DEV2020-01-05T15:30:21Z123Microsoft Graphyaya.txt15123

4. msgraph-create-new-folder


Create a new folder in a Drive with a specified parent item or path.

Required Permissions
Files.ReadWrite.All
Sites.ReadWrite.All
Base Command

msgraph-create-new-folder

Input
Argument NameDescriptionRequired
object_typeMS Graph resource.Required
object_type_idMS Graph resource id.Required
parent_idAn ID of the Drive to upload the folder to.Required
folder_namethe folder name for the created folder.Required
Context Output
PathTypeDescription
MsGraph.FolderUnknownGraph's folder object
Msgraphfiles.CreatedFolder.ParentReference.DriveIdStringUnique identifier of the drive that contains the item.
Msgraphfiles.CreatedFolder.ParentReference.DriveTypeStringIdentifies the type of drive.
Msgraphfiles.CreatedFolder.ParentReference.IDStringUnique identifier of the item in the drive.
Msgraphfiles.CreatedFolder.ParentReference.PathStringPath to navigate to the item
Msgraphfiles.CreatedFolder.LastModifiedDateTimeDateDate and time that the item was last modified.
Msgraphfiles.CreatedFolder.NameStringThe folder's name
Msgraphfiles.CreatedFolder.CreatedDateTimeDateTimestamp of item creation.
Msgraphfiles.CreatedFolder.WebUrlStringURL to the resource in the browser
Msgraphfiles.CreatedFolder.OdataContextStringOData query
Msgraphfiles.CreatedFolder.FileSystemInfo.CreatedDateTimeDateThe date and time the item was created on a client.
Msgraphfiles.CreatedFolder.FileSystemInfo.LastModifiedDateTimeDateThe date and time the item was last modified on a client
Msgraphfiles.CreatedFolder.LastModifiedBy.DisplayNameStringThe item display name
Msgraphfiles.CreatedFolder.LastModifiedBy.IDStringThe item display name
Msgraphfiles.CreatedFolder.CreatedBy.DisplayNameStringIdentity of the user, device,or application which created the item
Msgraphfiles.CreatedFolder.CreatedBy.IDStringThe ID of the creator
Msgraphfiles.CreatedFolder.ChildCountNumberThe number of the folder's sub items
Msgraphfiles.CreatedFolder.IDStringFolder ID
Msgraphfiles.CreatedFolder.SizeNumberFolder size
Command Example

!msgraph-create-new-folder object_type=drives object_type_id=123 parent_id=123 folder_name=test11

Context Example
{
"MsGraphFiles.CreatedFolders": {
"ParentReference": {
"DriveId": "test",
"DriveType": "documentLibrary",
"ID": "test",
"Path": "test"
},
"OdataContext": "test",
"LastModifiedDateTime": "2020-01-22T20:03:09Z",
"Name": "test11 19",
"CreatedDateTime": "2020-01-22T20:03:09Z",
"WebUrl": "test",
"FileSystemInfo": {
"CreatedDateTime": "2020-01-22T20:03:09Z",
"LastModifiedDateTime": "2020-01-22T20:03:09Z"
},
"LastModifiedBy": {
"Type": "Application",
"DisplayName": "Microsoft Graph",
"ID": "test"
},
"CreatedBy": {
"Type": "Application",
"DisplayName": "Microsoft Graph",
"ID": "test"
},
"Folder": {
"ChildCount": 0
},
"ID": "test",
"Size": 0
}
}
Human Readable Output

MsGraphFiles - Folder information:

Child CountCreated ByCreated Date TimeIDLast Modified ByNameSizeWeb Url
ChildCount: 0Microsoft Graph2020-01-22T20:03:09Z123Microsoft Graphtest11 190123

5. msgraph-list-drives-in-site


Returns the list of Drive resources available for a target Site

Required Permissions
Sites.ReadWrite.All
Files.ReadWrite.All
Base Command

msgraph-list-drives-in-site

Input
Argument NameDescriptionRequired
site_idSelected Site ID.Optional
limitSets the page size of results.Optional
next_page_urlThe URL for the next results page.Optional
Context Output
PathTypeDescription
MsGraphFiles.ListDrives.Value.LastModifiedDateTimeDateDate and time that the item was last modified
MsGraphFiles.ListDrives.Value.DescriptionStringA user visible description of the drive
MsGraphFiles.ListDrives.Value.CreatedDateTimeDateTimestamp of Drive creation
MsGraphFiles.ListDrives.Value.WebUrlStringURL to the resource in the browser
MsGraphFiles.ListDrives.Value.CreatedByStringIdentity of the user, application, or device which created the Drive.
MsGraphFiles.ListDrives.Value.Owner.DisplayNameStringDisplayName of the user, device or application which owns the Drive
MsGraphFiles.ListDrives.Value.Owner.IDStringID of the user, device or application which owns the Drive
MsGraphFiles.ListDrives.Value.Owner.TypeStringuser, device or application
MsGraphFiles.ListDrives.Value.DriveTypeStringIdentifies the type of drive
MsGraphFiles.ListDrives.Value.IDStringDrive ID
MsGraphFiles.ListDrives.Value.NameStringThe drive's name
MsGraphFiles.ListDrives.OdataContextStringOData query
Command Example

!msgraph-list-drives-in-site limit=1 site_id=test limit=1

Context Example
{
"MsGraphFiles.ListDrives": {
"OdataContext": "test",
"Value": [
{
"LastModifiedDateTime": "2019-09-21T08:17:20Z",
"Description": "",
"CreatedDateTime": "2019-09-21T08:17:20Z",
"WebUrl": "test",
"CreatedBy": {
"Type": "User",
"DisplayName": "System Account"
},
"Owner": {
"Group": {
"DisplayName": "site_test2 Owners",
"Email": "test",
"ID": "a6975ca6-9adf-40e9-bf1e-3f574e7510ae"
}
},
"DriveType": "documentLibrary",
"ID": "test",
"Name": "Documents"
}
]
}
}
Human Readable Output

MsGraphFiles - Drives information:

Created ByCreated Date TimeDescriptionDrive TypeIDLast Modified Date TimeNameWeb Url
System Account2019-09-21T08:17:20ZdocumentLibraryTest2019-09-21T08:17:20ZDocumentsTest

6. msgraph-list-drive-content


This command list all the drive's files and folders

Required Permissions
Files.ReadWrite.All
Sites.ReadWrite.All
Base Command

msgraph-list-drive-content

Input
Argument NameDescriptionRequired
object_typeMS Graph resource.Required
object_type_idMS Graph resource id.Required
item_idMs Graph item_id.Optional
limitSets the page size of results.Optional
next_page_urlThe URL for the next results page.Optional
Context Output
PathTypeDescription
MsGraphFiles.ListChildren.Children.Value.OdataNextLinkStringThe URL for the next results page.
MsGraphFiles.ListChildren.Children.Value.ParentReference.DriveIdStringUnique identifier of the drive that contains the item.
MsGraphFiles.ListChildren.Children.Value.ParentReference.DriveTypeStringIdentifies the type of drive.
MsGraphFiles.ListChildren.Children.Value.ParentReference.IDStringUnique identifier of the item in the drive.
MsGraphFiles.ListChildren.Children.Value.ParentReference.PathStringPath to navigate to the item
MsGraphFiles.ListChildren.Children.Value.LastModifiedDateTimeDateDate and time that the item was last modified.
MsGraphFiles.ListChildren.Children.Value.NameStringThe file's name
MsGraphFiles.ListChildren.Children.Value.CreatedDateTimeDateTimestamp of item creation.
MsGraphFiles.ListChildren.Children.Value.WebUrlStringURL to the resource in the browser
MsGraphFiles.ListChildren.Children.Value.FileSystemInfo.CreatedDateTimeDateThe date and time the item was created on a client.
MsGraphFiles.ListChildren.Children.Value.FileSystemInfo.LastModifiedDateTimeDateThe date and time the item was last modified on a client.
MsGraphFiles.ListChildren.Children.Value.LastModifiedBy.DisplayNameStringThe item display name
MsGraphFiles.ListChildren.Children.Value.LastModifiedBy.IDStringIdentity of the application, user or device which last modified the item
MsGraphFiles.ListChildren.Children.Value.CreatedBy.DisplayNameStringIdentity of the user, device,or application which created the item
MsGraphFiles.ListChildren.Children.Value.CreatedBy.IDStringThe ID of the creator
MsGraphFiles.ListChildren.Children.Value.CreatedBy.TypeStringapplication, user or device
MsGraphFiles.ListChildren.IDStringFile or folder ID
MsGraphFiles.ListChildren.Children.SizeNumberFile or folder size
MsGraphFiles.ListChildren.Children.OdataContextStringOData query
Command Example

!msgraph-list-drive-content object_type=drives limit=1 object_type_id=test parent_id=test

Context Example
{
"MsGraphFiles.ListChildren": {
"Children": {
"OdataContext": "test",
"Value": [
{
"ParentReference": {
"DriveId": "test",
"DriveType": "documentLibrary",
"ID": "test",
"Path": "test"
},
"LastModifiedDateTime": "2019-12-29T11:57:41Z",
"Name": "Attachments",
"CreatedDateTime": "2019-12-29T11:57:41Z",
"WebUrl": "test",
"FileSystemInfo": {
"CreatedDateTime": "2019-12-29T11:57:41Z",
"LastModifiedDateTime": "2019-12-29T11:57:41Z"
},
"LastModifiedBy": {
"Type": "Application",
"DisplayName": "MS Graph Files",
"ID": "test"
},
"CreatedBy": {
"Type": "Application",
"DisplayName": "MS Graph Files Dev",
"ID": "test"
},
"Folder": {
"ChildCount": 2
},
"ID": "test",
"Size": 0
}
]
},
"ParentID": "root"
}
}
Human Readable Output

MsGraphFiles - drivesItems information:

Created ByCreated Date TimeDescriptionIDLast Modified Date TimeNameSizeWeb Url
MS Graph Files Dev2019-12-29T11:57:41Z1232019-12-29T11:57:41ZAttachments0123

7. msgraph-list-share-point-sites


Returns a list of the tenant Sites

Required Permissions
Sites.ReadWrite.All
Base Command

msgraph-list-share-point-sites

Input

There are no input arguments for this command.

Context Output
PathTypeDescription
MsGraph.SitesUnknownGraph's site object
MsGraphFiles.OdataContextStringOData query
MsGraphFiles.OdataNextLinkStringThe URL for the next results page.
MsGraphFiles.ListSites.Value.LastModifiedDateTimeStringDate and time that the item was last modified.
MsGraphFiles.ListSites.Value.DisplayNameStringThe item display name
MsGraphFiles.ListSites.Value.DescriptionStringThe item description
MsGraphFiles.ListSites.Value.CreatedDateTimeDateimestamp of site creation
MsGraphFiles.ListSites.Value.WebUrlStringURL to the resource in the browser
MsGraphFiles.ListSites.Value.OdataContextStringOData query
MsGraphFiles.ListSites.Value.SiteCollection.HostnameStringThe hostname for the site collection
MsGraphFiles.ListSites.Value.IDStringSite id
MsGraphFiles.ListSites.Value.NameStringSite name
Command Example

!msgraph-list-share-point-sites site_id=123

Context Example
{
"MsGraphFiles.ListSites": {
"OdataContext": "123",
"Value": [
{
"LastModifiedDateTime": "2016-09-14T11:13:53Z",
"DisplayName": "Demisto Team",
"Name": "123",
"CreatedDateTime": "2016-09-14T11:12:59Z",
"WebUrl": "123",
"SiteCollection": {
"Hostname": "123"
},
"Root": {},
"ID": "123"
},
{
"LastModifiedDateTime": "2019-09-21T08:17:21Z",
"DisplayName": "123",
"Description": "this is a private site",
"CreatedDateTime": "2019-09-23T15:55:03Z",
"WebUrl": "123",
"SiteCollection": {
"Hostname": "123"
},
"Root": {},
"ID": "123",
"Name": "site_test_1"
},
{
"LastModifiedDateTime": "2019-09-21T08:17:21Z",
"DisplayName": "site_test2",
"Description": "this is a public site",
"CreatedDateTime": "2019-09-23T15:57:14Z",
"WebUrl": "123",
"SiteCollection": {
"Hostname": "123"
},
"Root": {},
"ID": "123",
"Name": "site_test2"
},
{
"LastModifiedDateTime": "0001-01-01T08:00:00Z",
"DisplayName": "Community",
"Name": "Community",
"CreatedDateTime": "2016-09-14T11:15:40Z",
"WebUrl": "123",
"SiteCollection": {
"Hostname": "123"
},
"Root": {},
"ID": "123"
},
{
"LastModifiedDateTime": "0001-01-01T08:00:00Z",
"DisplayName": "PointPublis",
"Name": "hub",
"CreatedDateTime": "2016-09-14T11:14:07Z",
"WebUrl": "123",
"SiteCollection": {
"Hostname": "123"
},
"Root": {},
"ID": "123"
},
{
"LastModifiedDateTime": "0001-01-01T08:00:00Z",
"DisplayName": "shelly",
"Name": "DemistoTe",
"CreatedDateTime": "2020-01-05T13:28:50Z",
"WebUrl": "123",
"SiteCollection": {
"Hostname": "123"
},
"Root": {},
"ID": "123"
},
{
"LastModifiedDateTime": "0001-01-01T08:00:00Z",
"DisplayName": "Sade - shelly",
"Name": "Sade-shelly",
"CreatedDateTime": "2020-01-05T13:27:51Z",
"WebUrl": "123",
"SiteCollection": {
"Hostname": "123"
},
"Root": {},
"ID": "123"
},
{
"LastModifiedDateTime": "0001-01-01T08:00:00Z",
"DisplayName": "DemistoTeam - test",
"Name": "DemistoTeam79-test",
"CreatedDateTime": "2020-01-06T08:05:27Z",
"WebUrl": "123",
"SiteCollection": {
"Hostname": "123"
},
"Root": {},
"ID": "123"
}
]
}
}
Human Readable Output

List Sites:

Created Date TimeIDLast Modified Date TimeNameWeb Url
2016-09-14T11:12:59Z1232016-09-14T11:13:53Z123123
2019-09-23T15:55:03Z1232019-09-21T08:17:21Zsite_test_1123
2019-09-23T15:57:14Z1232019-09-21T08:17:21Zsite_test2123
2016-09-14T11:15:40Z1230001-01-01T08:00:00ZCommunity123
2016-09-14T11:14:07Z1230001-01-01T08:00:00Zhub123
2020-01-05T13:28:50Z1230001-01-01T08:00:00ZDemistoTeam79-shelly123
2020-01-05T13:27:51Z1230001-01-01T08:00:00ZSade-shelly123
2020-01-06T08:05:27Z1230001-01-01T08:00:00ZDemistoTeam79-test123
2016-09-14T11:14:02Z1232016-09-14T11:15:28ZcontentTypeHub123
2018-12-26T09:44:17Z1232018-11-17T12:17:41Ztestpublic123
2018-12-26T09:42:25Z1232018-11-17T12:17:41Ztestgroup123
2019-08-03T11:31:53Z1232019-07-27T08:31:04Zwowalias1123
2019-08-03T06:17:27Z1232019-07-27T08:31:04Zlibrary123
2019-08-03T11:30:11Z1232019-07-27T08:31:04Zwowalias123
2019-08-24T09:39:08Z1232019-07-27T08:31:04ZDemistoTeam79123
2019-08-27T13:00:28Z1232019-08-24T10:14:13ZSade123
2019-10-25T20:20:29Z1232019-10-19T23:21:12Zkkk123
2019-11-12T13:49:07Z1232019-11-03T01:15:16ZFileTestTeam123
2019-12-31T07:58:14Z1232019-11-17T05:24:33ZShellysTeam123
2020-01-05T15:17:45Z1232019-11-17T05:24:33Zaaaaa123

8. msgraph-download-file


Download the contents of the file of a DriveItem.

Required Permissions
Files.ReadWrite.All
Sites.ReadWrite.All
Base Command

msgraph-download-file

Input
Argument NameDescriptionRequired
object_typeMS Graph resource.Required
object_type_idMS Graph resource id.Required
item_idMs Graph item_id.Required
Context Output
PathTypeDescription
File.SizeStringFile's size
File.SHA1StringFile's SHA1
File.SHA256StringFile's SHA256
File.SHA512StringFile's SHA512
File.NameStringFile name
File.SSDeepStringFile's SSDeep
File.EntryIDUnknownDemisto file ID
File.InfoStringFile information
File.TypeStringFile type
File.MD5StringFile's MD5
Command Example

!msgraph-download-file object_type=drives object_type_id=123 item_id=123