Skip to main content

O365 File Management (Onedrive/Sharepoint/Teams)

This Integration is part of the Microsoft Graph Files Pack.#

Use the O365 File Management (Onedrive/Sharepoint/Teams) integration to enable your app to get authorized access to files in OneDrive, SharePoint, and MS Teams across your entire organization. This integration requires admin consent.

Authentication#

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

Required Permissions#

  • Directory.Read.All - Delegated
  • Files.ReadWrite.All - Application
  • Files.ReadWrite.All - Delegated
  • Sites.ReadWrite.All - Application
  • Sites.ReadWrite.All - Delegated
  • User.Read - Delegated

Configure O365 File Management (Onedrive/Sharepoint/Teams) on Cortex XSOAR#

  1. Navigate to Settings > Integrations > Servers & Services.
  2. Search for O365 File Management (Onedrive/Sharepoint/Teams).
  3. Click Add instance to create and configure a new integration instance.
ParameterDescriptionRequired
hostServer URLTrue
auth_idID (received from the admin consent - see Detailed Instructions)False
tenant_idToken (received from the admin consent - see Detailed Instructions)False
enc_keyKey (received from the admin consent - see Detailed Instructions)False
Certificate ThumbprintUsed for certificate authentication. As appears in the "Certificates & secrets" page of the app.False
Private KeyUsed for certificate authentication. The private key of the registered certificate.False
Use Azure Managed IdentitiesRelevant only if the integration is running on Azure VM. If selected, authenticates based on the value provided for the Azure Managed Identities Client ID field. If no value is provided for the Azure Managed Identities Client ID field, authenticates based on the System Assigned Managed Identity. For additional information, see the Help tab.False
Azure Managed Identities Client IDThe Managed Identities client id for authentication - relevant only if the integration is running on Azure VM.False
insecureTrust any certificate (not secure)False
proxyUse system proxy settingsFalse
self_deployedUse a self-deployed Azure ApplicationFalse
  1. Click Test to validate the URLs, token, and connection.

Commands#

You can execute these commands from the Cortex XSOAR 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.

msgraph-delete-file#


Deletes an item from OneDrive.

Base Command#

msgraph-delete-file

Input#

Argument NameDescriptionRequired
object_typeThe MS Graph resource. Can be "drives", "groups", "sites", or "users".Required
object_type_idMS Graph resource ID.
For resource type 'drive': To get a list of all drives in your site, use the msgraph-list-drives-in-site command.
For resource type 'group': To get a list of all groups that exists, configure the 'Azure Active Directory Groups' integration and use the msgraph-groups-list-groups command.
For resource type 'sites': To get a list of all sites, use the msgraph-list-sharepoint-sites command.
For resource type 'users': To get a list of all users that exists, configure the 'Azure Active Directory Users' integration and use the msgraph-user-list command.
Required
item_idThe ID of the item to delete.
In order to get the ID of the file you want to delete you can use the msgraph-list-drive-content command.
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#

123
Item was deleted successfully

msgraph-upload-new-file#


Uploads a file from Cortex XSOAR to the specified MS Graph resource.

Base Command#

msgraph-upload-new-file

Input#

Argument NameDescriptionRequired
object_typeThe MS Graph resource. Can be "drives", "groups", "sites", or "users".Required
object_type_idMS Graph resource ID.
For resource type 'drive': To get a list of all drives in your site, use the msgraph-list-drives-in-site command.
For resource type 'group': To get a list of all groups that exists, configure the 'Azure Active Directory Groups' integration and use the msgraph-groups-list-groups command.
For resource type 'sites': To get a list of all sites, use the msgraph-list-sharepoint-sites command.
For resource type 'users': To get a list of all users that exists, configure the 'Azure Active Directory Users' integration and use the msgraph-user-list command.
Required
parent_idThe ID of the folder in which to upload the file.
In order to get the ID of a folder, you can use the msgraph-list-drive-content command.
Required
file_nameA name for the file to upload.Required
entry_idThe Cortex XSOAR entry ID of the file.Required

Context Output#

PathTypeDescription
MsGraphFiles.UploadedFiles.ParentReference.DriveIdStringUnique identifier of the drive that contains the item.
MsGraphFiles.UploadedFiles.ParentReference.DriveTypeStringIdentifies the drive type.
MsGraphFiles.UploadedFiles.ParentReference.IDStringUnique identifier of the item in the drive.
MsGraphFiles.UploadedFiles.ParentReference.PathStringThe path of the item.
MsGraphFiles.UploadedFiles.LastModifiedDateTimeStringTimestamp of when the item was last modified.
MsGraphFiles.UploadedFiles.File.MimeTypeStringThe file type.
MsGraphFiles.UploadedFiles.File.HashesStringThe file hash type.
MsGraphFiles.UploadedFiles.CreatedDateTimeStringTimestamp of when the item was created.
MsGraphFiles.UploadedFiles.WebUrlStringURL to the resource in the browser.
MsGraphFiles.UploadedFiles.OdataContextStringThe OData query.
MsGraphFiles.UploadedFiles.FileSystemInfo.CreatedDateTimeStringTimestamp of when the item was created on a client.
MsGraphFiles.UploadedFiles.FileSystemInfo.LastModifiedDateTimeStringTimestamp of when the item was last modified on a client.
MsGraphFiles.UploadedFiles.LastModifiedBy.DisplayNameStringThe item display name.
MsGraphFiles.UploadedFiles.LastModifiedBy.TypeStringThe application, user, or device that last modified the item.
MsGraphFiles.UploadedFiles.CreatedBy.DisplayNameStringThe identity of the user, device,or application that created the item.
MsGraphFiles.UploadedFiles.CreatedBy.IDStringThe ID of the creator.
MsGraphFiles.UploadedFiles.CreatedBy.TypeStringThe application, user, or device that created the item.
MsGraphFiles.UploadedFiles.DownloadUrlStringURL to download this file's content.
MsGraphFiles.UploadedFiles.SizeNumberThe file size.
MsGraphFiles.UploadedFiles.IDStringThe file ID.
MsGraphFiles.UploadedFiles.NameStringThe file name.
MsGraph.UploadedFiles.FileStringThe MS Graph 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#

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

msgraph-replace-existing-file#


Replaces the content of the file in the specified MS Graph resource.

Base Command#

msgraph-replace-existing-file

Input#

Argument NameDescriptionRequired
object_typeThe MS Graph resource. Can be "drives", "groups", "sites", or "users".Required
object_type_idMS Graph resource ID.
For resource type 'drive': To get a list of all drives in your site, use the msgraph-list-drives-in-site command.
For resource type 'group': To get a list of all groups that exists, configure the 'Azure Active Directory Groups' integration and use the msgraph-groups-list-groups command.
For resource type 'sites': To get a list of all sites, use the msgraph-list-sharepoint-sites command.
For resource type 'users': To get a list of all users that exists, configure the 'Azure Active Directory Users' integration and use the msgraph-user-list command.
Required
item_idThe MS Graph item ID of the file you want to replace.
In order to get the ID of the file you want to replace you can use the msgraph-list-drive-content command.
Required
entry_idThe Cortex XSOAR entry ID of the replacing file.Required

Context Output#

PathTypeDescription
MsGraphFiles.ReplacedFiles.ParentReference.DriveIdStringUnique identifier of the drive that contains the item.
MsGraphFiles.ReplacedFiles.ParentReference.DriveTypeStringThe drive type.
MsGraphFiles.ReplacedFiles.ParentReference.IDStringUnique identifier of the item in the drive.
MsGraphFiles.ReplacedFiles.ParentReference.PathStringThe path of the item.
MsGraphFiles.ReplacedFiles.LastModifiedDateTimeDateTimestamp of when the item was last modified.
MsGraphFiles.ReplacedFiles.File.MimeTypeStringThe file type.
MsGraphFiles.ReplacedFiles.File.HashesStringThe file hash type.
MsGraphFiles.ReplacedFiles.CreatedDateTimeStringTimestamp of when the item was created.
MsGraphFiles.ReplacedFiles.WebUrlStringURL to the resource in the browser.
MsGraphFiles.ReplacedFiles.OdataContextStringThe OData query.
MsGraphFiles.ReplacedFiles.FileSystemInfo.CreatedDateTimeDateTimestamp of when the item was created on a client.
MsGraphFiles.ReplacedFiles.FileSystemInfo.LastModifiedDateTimeDateTimestamp of when the item was last modified on a client.
MsGraphFiles.ReplacedFiles.LastModifiedBy.DisplayNameStringThe item display name.
MsGraphFiles.ReplacedFiles.LastModifiedBy.IDStringIdentity of the application that last modified the item.
MsGraphFiles.ReplacedFiles.CreatedBy.DisplayNameStringIdentity of the user, device, or application that 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.IdStringThe file ID.
MsGraphFiles.ReplacedFiles.NameStringThe file name.
MsGraphFiles.ReplacedFiles.FileStringThe MS Graph 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

msgraph-create-new-folder#


Creates a new folder in a drive with the specified parent item or path.

Base Command#

msgraph-create-new-folder

Input#

Argument NameDescriptionRequired
object_typeThe MS Graph resource. Can be "drives", "groups", "sites", or "users".Required
object_type_idMS Graph resource ID.
For resource type 'drive': To get a list of all drives in your site, use the msgraph-list-drives-in-site command.
For resource type 'group': To get a list of all groups that exists, configure the 'Azure Active Directory Groups' integration and use the msgraph-groups-list-groups command.
For resource type 'sites': To get a list of all sites, use the msgraph-list-sharepoint-sites command.
For resource type 'users': To get a list of all users that exists, configure the 'Azure Active Directory Users' integration and use the msgraph-user-list command.
Required
parent_idThe ID of the parent in which to upload the new folder.
Parent can be either 'root' or another folder.
In order to get the required folder ID you can use the msgraph-list-drive-content command.
Required
folder_nameThe name of the new folder.Required

Context Output#

PathTypeDescription
MsGraph.FolderUnknownThe MS Graph folder object.
Msgraphfiles.CreatedFolder.ParentReference.DriveIdStringUnique identifier of the drive that contains the item.
Msgraphfiles.CreatedFolder.ParentReference.DriveTypeStringThe drive type.
Msgraphfiles.CreatedFolder.ParentReference.IDStringUnique identifier of the item in the drive.
Msgraphfiles.CreatedFolder.ParentReference.PathStringThe path to the item
Msgraphfiles.CreatedFolder.LastModifiedDateTimeDateTimestamp of when the item was last modified.
Msgraphfiles.CreatedFolder.NameStringThe folder name.
Msgraphfiles.CreatedFolder.CreatedDateTimeDateTimestamp of when the item was created.
Msgraphfiles.CreatedFolder.WebUrlStringURL to the resource in the browser.
Msgraphfiles.CreatedFolder.OdataContextStringThe OData query.
Msgraphfiles.CreatedFolder.FileSystemInfo.CreatedDateTimeDateTimestamp of when the item was created on a client.
Msgraphfiles.CreatedFolder.FileSystemInfo.LastModifiedDateTimeDateTimestamp of when the item was last modified on a client.
Msgraphfiles.CreatedFolder.LastModifiedBy.DisplayNameStringThe item display name.
Msgraphfiles.CreatedFolder.LastModifiedBy.IDStringIdentity of the application that last modified the item.
Msgraphfiles.CreatedFolder.CreatedBy.DisplayNameStringIdentity of the user, device,or application that created the item.
Msgraphfiles.CreatedFolder.CreatedBy.IDStringThe ID of the creator.
Msgraphfiles.CreatedFolder.ChildCountNumberThe number of sub-items in the folder.
Msgraphfiles.CreatedFolder.IDStringThe folder ID.
Msgraphfiles.CreatedFolder.SizeNumberThe folder 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

msgraph-list-drives-in-site#


Returns the list of document libraries (drives) available for a target site.

Base Command#

msgraph-list-drives-in-site

Input#

Argument NameDescriptionRequired
site_idThe ID of the site for which to return available drive resources.
To find a list of all sites, use the msgraph-list-sharepoint-sites command.
Optional
limitThe maximum number of results to return.Optional
next_page_urlThe URL for the next results page.
If a next page of results exists, you will find it in Cortex XSOAR context under MsGraphFiles.ListDrives.OdataNextLink.
Optional

Context Output#

PathTypeDescription
MsGraphFiles.ListDrives.Value.LastModifiedDateTimeDateTimestamp of when the item was last modified.
MsGraphFiles.ListDrives.Value.DescriptionStringA human-readable description of the drive.
MsGraphFiles.ListDrives.Value.CreatedDateTimeDateTimestamp of when the drive was created.
MsGraphFiles.ListDrives.Value.WebUrlStringURL to the resource in the browser.
MsGraphFiles.ListDrives.Value.CreatedByStringIdentity of the user, application, or device that created the drive.
MsGraphFiles.ListDrives.Value.Owner.DisplayNameStringThe display name of the user, device, or application that owns the drive.
MsGraphFiles.ListDrives.Value.Owner.IDStringThe ID of the user, device, or application that owns the drive.
MsGraphFiles.ListDrives.Value.Owner.TypeStringThe owner type. Can be "user", "device", or "application".
MsGraphFiles.ListDrives.Value.DriveTypeStringThe drive type.
MsGraphFiles.ListDrives.Value.IDStringThe drive ID.
MsGraphFiles.ListDrives.Value.NameStringThe name of the drive.
MsGraphFiles.ListDrives.OdataContextStringThe OData 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

msgraph-list-drive-content#


Returns a list of files and folders in the specified drive.

Base Command#

msgraph-list-drive-content

Input#

Argument NameDescriptionRequired
object_typeThe MS Graph resource. Can be "drives", "groups", "sites", or "users".Required
object_type_idMS Graph resource ID.
For resource type 'drive': To get a list of all drives in your site, use the msgraph-list-drives-in-site command.
For resource type 'group': To get a list of all groups that exists, configure the 'Azure Active Directory Groups' integration and use the msgraph-groups-list-groups command.
For resource type 'sites': To get a list of all sites, use the msgraph-list-sharepoint-sites command.
For resource type 'users': To get a list of all users that exists, configure the 'Azure Active Directory Users' integration and use the msgraph-user-list command.
Required
item_idThe MS Graph item ID.
It can be either 'root' or another folder.
Passing a folder ID retrieves files from a specified folder.
The default is 'root': retrieve content in the root of the drive.

In order to get the required folder ID you can use this command and leave this argument empty in order to get a list of folders that are located in the root.

If your folder is nested inside another folder, pass the parent ID found when running this command without 'item_id', to this argument to get the required folder ID.
Optional
limitThe maximum number of results to return.Optional
next_page_urlThe URL for the next results page.
If a next page of results exists, you will find it in Cortex XSOAR context under MsGraphFiles.ListChildren.OdataNextLink.
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.DriveTypeStringThe drive type.
MsGraphFiles.ListChildren.Children.Value.ParentReference.IDStringUnique identifier of the item in the drive.
MsGraphFiles.ListChildren.Children.Value.ParentReference.PathStringThe path to the item.
MsGraphFiles.ListChildren.Children.Value.LastModifiedDateTimeDateTimestamp of when the item was last modified.
MsGraphFiles.ListChildren.Children.Value.NameStringThe file name.
MsGraphFiles.ListChildren.Children.Value.CreatedDateTimeDateTimestamp of when the item was created.
MsGraphFiles.ListChildren.Children.Value.WebUrlStringURL to the resource in the browser.
MsGraphFiles.ListChildren.Children.Value.FileSystemInfo.CreatedDateTimeDateTimestamp of when the item was created on a client.
MsGraphFiles.ListChildren.Children.Value.FileSystemInfo.LastModifiedDateTimeDateTimestamp of when 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 that last modified the item.
MsGraphFiles.ListChildren.Children.Value.CreatedBy.DisplayNameStringIdentity of the user, device, or application that created the item.
MsGraphFiles.ListChildren.Children.Value.CreatedBy.IDStringThe ID of the creator.
MsGraphFiles.ListChildren.Children.Value.CreatedBy.TypeStringThe created by type. Can be "application", "user", or "device".
MsGraphFiles.ListChildren.IDStringThe file ID or folder ID.
MsGraphFiles.ListChildren.Children.SizeNumberThe file size or folder size.
MsGraphFiles.ListChildren.Children.OdataContextStringThe OData 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

msgraph-list-sharepoint-sites#


Returns a list of the tenant sites.

Base Command#

msgraph-list-sharepoint-sites

Input#

There are no input arguments for this command.

Context Output#

PathTypeDescription
MsGraph.SitesUnknownThe MS Graph site object.
MsGraphFiles.OdataContextStringThe OData query.
MsGraphFiles.OdataNextLinkStringThe URL for the next results page.
MsGraphFiles.ListSites.Value.LastModifiedDateTimeStringTimestamp of when the item was last modified.
MsGraphFiles.ListSites.Value.DisplayNameStringThe item display name.
MsGraphFiles.ListSites.Value.DescriptionStringThe item description.
MsGraphFiles.ListSites.Value.CreatedDateTimeDateTimestamp of when the site was created.
MsGraphFiles.ListSites.Value.WebUrlStringURL to the resource in the browser.
MsGraphFiles.ListSites.Value.OdataContextStringThe OData query.
MsGraphFiles.ListSites.Value.SiteCollection.HostnameStringThe hostname for the site collection.
MsGraphFiles.ListSites.Value.IDStringThe site ID.
MsGraphFiles.ListSites.Value.NameStringThe site 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": "XSOAR Team",
"Name": "123",
"CreatedDateTime": "2016-09-14T11:12:59Z",
"WebUrl": "123",
"SiteCollection": {
"Hostname": "123"
},
"Root": {},
"ID": "123"
}
]
}
}

Human Readable Output#

Created Date TimeIDLast Modified Date TimeNameWeb Url
2016-09-14T11:12:59Z1232016-09-14T11:13:53Z123123

msgraph-download-file#


Downloads the file contents of the drive item.

Base Command#

msgraph-download-file

Input#

Argument NameDescriptionRequired
object_typeThe MS Graph resource. Can be "drives", "groups", "sites", or "users".Required
object_type_idMS Graph resource ID.
For resource type 'drive': To get a list of all drives in your site, use the msgraph-list-drives-in-site command.
For resource type 'group': To get a list of all groups that exists, configure the 'Azure Active Directory Groups' integration and use the msgraph-groups-list-groups command.
For resource type 'sites': To get a list of all sites, use the msgraph-list-sharepoint-sites command.
For resource type 'users': To get a list of all users that exists, configure the 'Azure Active Directory Users' integration and use the msgraph-user-list command.
Required
item_idThe MS Graph item ID.
In order to get the ID of the file you want to download you can use the msgraph-list-drive-content command.
Required

Context Output#

PathTypeDescription
File.SizeStringThe file size.
File.SHA1StringThe SHA1 hash of the file.
File.SHA256StringThe SHA256 hash of the file.
File.SHA512StringThe SHA512 hash of the file.
File.NameStringThe file name.
File.SSDeepStringThe SSDeep hash of the file.
File.EntryIDUnknownThe Cortex XSOAR file ID.
File.InfoStringInformation about the file.
File.TypeStringThe file type.
File.MD5StringThe MD5 hash of the file.

Command Example#

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

msgraph-files-auth-reset#


Run this command if for some reason you need to rerun the authentication process.

Base Command#

msgraph-files-auth-reset

Input#

There are no input arguments for this command.

Context Output#

There is no context output for this command.