Skip to content

Microsoft SharePoint and OneDrive v2

Find and fix oversharing in SharePoint and OneDrive through Graph

Lists site and OneDrive sharing, revokes anonymous and oversharing links, quarantines files, and runs site governance checks through Microsoft Graph.

@ftnt-dspilleMaintainer v5.0.0 Published Nov 28, 2026
Download .tgz · 36 KB

microsoft-sharepoint-v2_5.0.0.tgz

sha256:21cbaaea8f13d0290e6519078f570c48bf06bbe5ceb86083fb78d57f28c4358b

Community code that runs on your platform. A maintainer reviewed this exact source; the download is rebuilt from it. Follow the to install it.

Configuration · 8 fields

  • Tenant ID tenant_id text required

    Microsoft Entra ID tenant (directory) ID or domain.

  • Client ID client_id text required

    Application (client) ID of the Entra ID app registration.

  • Client Secret client_secret password required

    Client secret of the app registration (Certificates & secrets).

  • Default Site URL site_url text

    Optional default site. Operations take site_url as a parameter, which overrides this.

  • Internal Domains internal_domains text

    (Optional) Comma-separated domains of your organisation. A grantee outside them is reported as an external grantee. Without this, only guest identities (#EXT#) are external.

  • Verify SSL verify_ssl checkbox

    Specifies whether SSL certificates are to be verified.

    Default true

  • Search Region search_region text

    Microsoft Search region for application permissions: NAM, EUR, APC, etc. Default NAM.

    Default NAM

  • Timeout (seconds) timeout integer

    Timeout for each Graph request.

    Default 60

Operations · 33

  • Health Check
    health_check

    Acquire a Graph token and read the root site.

    No parameters.

    Returns typeproperties
  • Get Site 1 param
    get_site

    Read one SharePoint site by URL.

    • Site URL site_url text required

      SharePoint site URL, for example https://contoso.sharepoint.com/sites/soc.

    Returns typeproperties
  • Get Lists 2 params
    get_lists

    List the lists and libraries of a site.

    • Site URL site_url text required

      SharePoint site URL, for example https://contoso.sharepoint.com/sites/soc.

    • Limit limit integer

      (Optional) Stop after this many items.

    Returns typeproperties
  • List Site Libraries 1 param
    list_site_libraries

    Names of the document libraries of a site (feeds the Document Library dropdown; not a playbook step).

    • Site URL site_url text required

      SharePoint site URL, for example https://contoso.sharepoint.com/sites/soc.

    Returns typeproperties
  • List Drives 2 params
    list_drives

    List the drives of a user (personal OneDrive and others) or of a site (its document libraries).

    • User ID or UPN user_id text

      User id or UPN. Lists the user's drives.

    • Site URL site_url text

      SharePoint site URL. Lists the site's document libraries.

    Returns typeproperties
  • Get Drive 4 params
    get_drive

    Read the drive a target names (drive_id, user_id, or site_url with library).

    • Drive ID drive_id text

      (Optional) Graph drive id of any drive (library, OneDrive or group drive). Wins over user_id and site_url.

    • User ID or UPN user_id text

      (Optional) User id or UPN: that user's personal OneDrive. Used when no drive_id is given.

    • Site URL site_url text

      SharePoint site URL (https://contoso.sharepoint.com/sites/soc). Used when no drive_id or user_id is given.

    • Document Library library text

      (Optional) Document library name with site_url. Default: the site's default library (Documents).

    Returns typeproperties
  • List Folder 6 params
    list_folder

    List the children of a folder (or the library root).

    • Drive ID drive_id text

      (Optional) Graph drive id of any drive (library, OneDrive or group drive). Wins over user_id and site_url.

    • User ID or UPN user_id text

      (Optional) User id or UPN: that user's personal OneDrive. Used when no drive_id is given.

    • Site URL site_url text

      SharePoint site URL (https://contoso.sharepoint.com/sites/soc). Used when no drive_id or user_id is given.

    • Document Library library text

      (Optional) Document library name with site_url. Default: the site's default library (Documents).

    • Folder Path folder_path text

      (Optional) Folder path inside the library. Default: library root.

    • Limit limit integer

      (Optional) Stop after this many items.

    Returns typeproperties
  • Search Files 6 params
    search_files

    Search a library by name and content (Graph drive search).

    • Drive ID drive_id text

      (Optional) Graph drive id of any drive (library, OneDrive or group drive). Wins over user_id and site_url.

    • User ID or UPN user_id text

      (Optional) User id or UPN: that user's personal OneDrive. Used when no drive_id is given.

    • Site URL site_url text

      SharePoint site URL (https://contoso.sharepoint.com/sites/soc). Used when no drive_id or user_id is given.

    • Document Library library text

      (Optional) Document library name with site_url. Default: the site's default library (Documents).

    • Query query text required

      Search text. Graph matches file names and content.

    • Limit limit integer

      (Optional) Stop after this many items.

    Returns typeproperties
  • Get File Metadata 5 params
    get_file_metadata

    Read one file or folder by path.

    • Drive ID drive_id text

      (Optional) Graph drive id of any drive (library, OneDrive or group drive). Wins over user_id and site_url.

    • User ID or UPN user_id text

      (Optional) User id or UPN: that user's personal OneDrive. Used when no drive_id is given.

    • Site URL site_url text

      SharePoint site URL (https://contoso.sharepoint.com/sites/soc). Used when no drive_id or user_id is given.

    • Document Library library text

      (Optional) Document library name with site_url. Default: the site's default library (Documents).

    • File Path file_path text required

      Path of the file inside the library, for example SOC Lab Seed/report.txt.

    Returns typeproperties
  • Download File 5 params
    read_file_content

    Download a file and store it as a FortiSOAR attachment.

    • Drive ID drive_id text

      (Optional) Graph drive id of any drive (library, OneDrive or group drive). Wins over user_id and site_url.

    • User ID or UPN user_id text

      (Optional) User id or UPN: that user's personal OneDrive. Used when no drive_id is given.

    • Site URL site_url text

      SharePoint site URL (https://contoso.sharepoint.com/sites/soc). Used when no drive_id or user_id is given.

    • Document Library library text

      (Optional) Document library name with site_url. Default: the site's default library (Documents).

    • File Path file_path text required

      Path of the file inside the library, for example SOC Lab Seed/report.txt.

    Returns typeproperties
  • Upload File 7 params
    upload_file

    Upload a FortiSOAR attachment into a library, replacing a file with the same name.

    • Drive ID drive_id text

      (Optional) Graph drive id of any drive (library, OneDrive or group drive). Wins over user_id and site_url.

    • User ID or UPN user_id text

      (Optional) User id or UPN: that user's personal OneDrive. Used when no drive_id is given.

    • Site URL site_url text

      SharePoint site URL (https://contoso.sharepoint.com/sites/soc). Used when no drive_id or user_id is given.

    • Document Library library text

      (Optional) Document library name with site_url. Default: the site's default library (Documents).

    • Folder Path folder_path text

      (Optional) Folder path inside the library. Default: library root.

    • File Name file_name text required

      Name of the file in SharePoint (no slashes).

    • Attachment attachment_id text required

      FortiSOAR attachment id, IRI or file IRI.

    Returns typeproperties
  • Delete File 5 params
    delete_file

    Delete a file (it moves to the site recycle bin).

    • Drive ID drive_id text

      (Optional) Graph drive id of any drive (library, OneDrive or group drive). Wins over user_id and site_url.

    • User ID or UPN user_id text

      (Optional) User id or UPN: that user's personal OneDrive. Used when no drive_id is given.

    • Site URL site_url text

      SharePoint site URL (https://contoso.sharepoint.com/sites/soc). Used when no drive_id or user_id is given.

    • Document Library library text

      (Optional) Document library name with site_url. Default: the site's default library (Documents).

    • File Path file_path text required

      Path of the file inside the library, for example SOC Lab Seed/report.txt.

    Returns typeproperties
  • List Permissions 5 params
    list_permissions

    List who can reach a file and how (links and grants), with exposure flags.

    • Drive ID drive_id text

      (Optional) Graph drive id of any drive (library, OneDrive or group drive). Wins over user_id and site_url.

    • User ID or UPN user_id text

      (Optional) User id or UPN: that user's personal OneDrive. Used when no drive_id is given.

    • Site URL site_url text

      SharePoint site URL (https://contoso.sharepoint.com/sites/soc). Used when no drive_id or user_id is given.

    • Document Library library text

      (Optional) Document library name with site_url. Default: the site's default library (Documents).

    • File Path file_path text required

      Path of the file inside the library, for example SOC Lab Seed/report.txt.

    Returns typeproperties
  • Create Sharing Link 7 params
    create_sharing_link

    Create a view or edit link for a file (anonymous, organization or users).

    • Drive ID drive_id text

      (Optional) Graph drive id of any drive (library, OneDrive or group drive). Wins over user_id and site_url.

    • User ID or UPN user_id text

      (Optional) User id or UPN: that user's personal OneDrive. Used when no drive_id is given.

    • Site URL site_url text

      SharePoint site URL (https://contoso.sharepoint.com/sites/soc). Used when no drive_id or user_id is given.

    • Document Library library text

      (Optional) Document library name with site_url. Default: the site's default library (Documents).

    • File Path file_path text required

      Path of the file inside the library, for example SOC Lab Seed/report.txt.

    • Link Type link_type select

      Default: view.

      Options vieweditembed
    • Scope scope select

      Default: organization.

      Options anonymousorganizationusers
    Returns typeproperties
  • Revoke Permission 6 params
    revoke_permission

    Remove one permission (a link or a grant) from a file.

    • Drive ID drive_id text

      (Optional) Graph drive id of any drive (library, OneDrive or group drive). Wins over user_id and site_url.

    • User ID or UPN user_id text

      (Optional) User id or UPN: that user's personal OneDrive. Used when no drive_id is given.

    • Site URL site_url text

      SharePoint site URL (https://contoso.sharepoint.com/sites/soc). Used when no drive_id or user_id is given.

    • Document Library library text

      (Optional) Document library name with site_url. Default: the site's default library (Documents).

    • File Path file_path text required

      Path of the file inside the library, for example SOC Lab Seed/report.txt.

    • Permission ID permission_id text required

      Permission id from List Permissions or Audit Sharing.

    Returns typeproperties
  • Grant File Access 8 params
    invite_user

    Grant one user read or write access to a file.

    • Drive ID drive_id text

      (Optional) Graph drive id of any drive (library, OneDrive or group drive). Wins over user_id and site_url.

    • User ID or UPN user_id text

      (Optional) User id or UPN: that user's personal OneDrive. Used when no drive_id is given.

    • Site URL site_url text

      SharePoint site URL (https://contoso.sharepoint.com/sites/soc). Used when no drive_id or user_id is given.

    • Document Library library text

      (Optional) Document library name with site_url. Default: the site's default library (Documents).

    • File Path file_path text required

      Path of the file inside the library, for example SOC Lab Seed/report.txt.

    • Email email text required

      Guest or member address.

    • Role role select

      Default: read.

      Options readwrite
    • Send Invitation send_invitation checkbox

      Email the invitation (default off).

    Returns typeproperties
  • Sharing Snapshot 7 params
    sharing_snapshot

    Take a compact snapshot of the sharing of every file under a folder, for permission-drift baselines. Returns the snapshot as a JSON string.

    • Drive ID drive_id text

      (Optional) Graph drive id of any drive (library, OneDrive or group drive). Wins over user_id and site_url.

    • User ID or UPN user_id text

      (Optional) User id or UPN: that user's personal OneDrive. Used when no drive_id is given.

    • Site URL site_url text

      SharePoint site URL (https://contoso.sharepoint.com/sites/soc). Used when no drive_id or user_id is given.

    • Document Library library text

      (Optional) Document library name with site_url. Default: the site's default library (Documents).

    • Folder Path folder_path text

      (Optional) Folder path inside the library. Default: library root.

    • Recursive recursive checkbox

      Descend into sub-folders (default on).

    • Max Files max_items integer

      Snapshot at most this many files (default 200, max 1000).

    Returns typeproperties
  • Diff Sharing Snapshot 2 params
    diff_sharing_snapshot

    Compare two snapshots and report drift: added and removed sharing entries, new and removed files, and the added link permissions that can be remediated.

    • Previous Snapshot previous text required

      Earlier snapshot JSON (from Sharing Snapshot).

    • Current Snapshot current text required

      Current snapshot JSON (from Sharing Snapshot).

    Returns typeproperties
  • List Recent Sites 2 params
    list_recent_sites

    List Microsoft 365 groups (each with a SharePoint site) created at or after a time, newest first.

    • Created After created_after text required

      ISO 8601 date or timestamp (UTC). Groups created at or after this time are listed.

    • Limit limit integer

      (Optional) Stop after this many items.

    Returns typeproperties
  • Get Site Governance 3 params
    get_site_governance

    Policy facts for one Microsoft 365 group and its site: owners, visibility, guests, sensitivity label, naming. Findings: owner_missing, visibility_public, naming_bad, label_missing, guests_present.

    • Group ID group_id text required

      Microsoft 365 group id (GUID).

    • Naming Prefix naming_prefix text

      Required display name prefix. Default SOAR-.

    • Require Sensitivity Label require_label boolean

      Report label_missing when no sensitivity label is set.

    Returns typeproperties
  • Add Group Owner 3 params
    add_group_owner

    Add a user as an owner of a Microsoft 365 group. Retries while a new group is still replicating.

    • Group ID group_id text required

      Microsoft 365 group id (GUID).

    • Owner UPN owner_upn text required

      User principal name of the new owner.

    • Attempts attempts integer

      Retries while the group is not ready (10 s apart). Default 6.

    Returns typeproperties
  • Set Group Visibility 2 params
    set_group_visibility

    Set a Microsoft 365 group's visibility to Public or Private.

    • Group ID group_id text required

      Microsoft 365 group id (GUID).

    • Visibility visibility text required

      Public or Private.

    Returns typeproperties
  • Audit Sharing 7 params
    audit_sharing

    Walk a folder and report every file's sharing exposure. Findings are files with an anonymous or organisation link, a user link, or any guest grantee.

    • Drive ID drive_id text

      (Optional) Graph drive id of any drive (library, OneDrive or group drive). Wins over user_id and site_url.

    • User ID or UPN user_id text

      (Optional) User id or UPN: that user's personal OneDrive. Used when no drive_id is given.

    • Site URL site_url text

      SharePoint site URL (https://contoso.sharepoint.com/sites/soc). Used when no drive_id or user_id is given.

    • Document Library library text

      (Optional) Document library name with site_url. Default: the site's default library (Documents).

    • Folder Path folder_path text

      (Optional) Folder path inside the library. Default: library root.

    • Recursive recursive checkbox

      Descend into sub-folders (default on).

    • Max Files max_items integer

      Audit at most this many files (default 100, max 1000).

    Returns typeproperties
  • Create Folder 7 params
    create_folder

    Create a folder under a folder (or the library root). Conflict behaviour fail (default) or rename.

    • Drive ID drive_id text

      (Optional) Graph drive id of any drive (library, OneDrive or group drive). Wins over user_id and site_url.

    • User ID or UPN user_id text

      (Optional) User id or UPN: that user's personal OneDrive. Used when no drive_id is given.

    • Site URL site_url text

      SharePoint site URL (https://contoso.sharepoint.com/sites/soc). Used when no drive_id or user_id is given.

    • Document Library library text

      (Optional) Document library name with site_url. Default: the site's default library (Documents).

    • Folder Path folder_path text

      (Optional) Folder path inside the library. Default: library root.

    • Folder Name folder_name text required

      Name of the new folder (no slashes).

    • Conflict Behavior conflict_behavior select

      Default: fail.

      Options failrename
    Returns typeproperties
  • Move Item 7 params
    move_item

    Move a file or folder to another folder of the library, optionally renaming it.

    • Drive ID drive_id text

      (Optional) Graph drive id of any drive (library, OneDrive or group drive). Wins over user_id and site_url.

    • User ID or UPN user_id text

      (Optional) User id or UPN: that user's personal OneDrive. Used when no drive_id is given.

    • Site URL site_url text

      SharePoint site URL (https://contoso.sharepoint.com/sites/soc). Used when no drive_id or user_id is given.

    • Document Library library text

      (Optional) Document library name with site_url. Default: the site's default library (Documents).

    • File Path file_path text required

      Path of the file inside the library, for example SOC Lab Seed/report.txt.

    • Destination Folder destination_folder_path text

      Drive-relative destination folder. Empty moves to the library root.

    • New Name new_name text

      Optional new name.

    Returns typeproperties
  • Copy File 12 params
    copy_item

    Copy a file to another folder. Same drive: a Graph server-side copy (asynchronous; with wait on, default, the connector polls until it completes). With a destination drive (dst_drive_id, dst_user_id or dst_site_url) the bytes are copied to that drive.

    • Drive ID drive_id text

      (Optional) Graph drive id of any drive (library, OneDrive or group drive). Wins over user_id and site_url.

    • User ID or UPN user_id text

      (Optional) User id or UPN: that user's personal OneDrive. Used when no drive_id is given.

    • Site URL site_url text

      SharePoint site URL (https://contoso.sharepoint.com/sites/soc). Used when no drive_id or user_id is given.

    • Document Library library text

      (Optional) Document library name with site_url. Default: the site's default library (Documents).

    • File Path file_path text required

      Path of the file inside the library, for example SOC Lab Seed/report.txt.

    • Destination Folder destination_folder_path text

      Drive-relative destination folder. Empty copies to the library root.

    • New Name new_name text

      Optional name for the copy.

    • Wait For Completion wait checkbox

      Poll the monitor until the copy finishes (default on).

    • Destination Drive ID dst_drive_id text

      (Optional) Destination drive id for a cross-drive copy. Empty: copy within the source drive.

    • Destination User ID or UPN dst_user_id text

      (Optional) Destination user's personal OneDrive.

    • Destination Site URL dst_site_url text

      (Optional) Destination SharePoint site URL.

    • Destination Library dst_library text

      (Optional) Destination library with dst_site_url.

    Returns typeproperties
  • List File Versions 6 params
    list_versions

    List the version history of a file (newest first, as Graph returns it).

    • Drive ID drive_id text

      (Optional) Graph drive id of any drive (library, OneDrive or group drive). Wins over user_id and site_url.

    • User ID or UPN user_id text

      (Optional) User id or UPN: that user's personal OneDrive. Used when no drive_id is given.

    • Site URL site_url text

      SharePoint site URL (https://contoso.sharepoint.com/sites/soc). Used when no drive_id or user_id is given.

    • Document Library library text

      (Optional) Document library name with site_url. Default: the site's default library (Documents).

    • File Path file_path text required

      Path of the file inside the library, for example SOC Lab Seed/report.txt.

    • Limit limit integer

      (Optional) Stop after this many items.

    Returns typeproperties
  • Restore File Version 6 params
    restore_version

    Make an earlier version of a file the current one. The version it replaces is kept in the history.

    • Drive ID drive_id text

      (Optional) Graph drive id of any drive (library, OneDrive or group drive). Wins over user_id and site_url.

    • User ID or UPN user_id text

      (Optional) User id or UPN: that user's personal OneDrive. Used when no drive_id is given.

    • Site URL site_url text

      SharePoint site URL (https://contoso.sharepoint.com/sites/soc). Used when no drive_id or user_id is given.

    • Document Library library text

      (Optional) Document library name with site_url. Default: the site's default library (Documents).

    • File Path file_path text required

      Path of the file inside the library, for example SOC Lab Seed/report.txt.

    • Version ID version_id text required

      Version id from List File Versions (for example 2.0).

    Returns typeproperties
  • Get List Item 3 params
    get_list_item

    Read one item of a SharePoint list with its fields.

    • Site URL site_url text required

      SharePoint site URL, for example https://contoso.sharepoint.com/sites/soc.

    • List list_name text required

      List display name, internal name or id.

    • Item ID item_id text required

      List item id.

    Returns typeproperties
  • Create List Item 3 params
    create_list_item

    Create an item in a SharePoint list from a JSON object of field values.

    • Site URL site_url text required

      SharePoint site URL, for example https://contoso.sharepoint.com/sites/soc.

    • List list_name text required

      List display name, internal name or id.

    • Fields (JSON) fields text required

      JSON object: column internal name to value.

    Returns typeproperties
  • Update List Item 4 params
    update_list_item

    Update some fields of a SharePoint list item (only the keys given change).

    • Site URL site_url text required

      SharePoint site URL, for example https://contoso.sharepoint.com/sites/soc.

    • List list_name text required

      List display name, internal name or id.

    • Item ID item_id text required

      List item id.

    • Fields (JSON) fields text required

      JSON object of the fields to change.

    Returns typeproperties
  • Upload Large File 8 params
    upload_file_large

    Upload a FortiSOAR attachment in chunks through a Graph upload session (for files above about 4 MB). Replaces a file with the same name.

    • Drive ID drive_id text

      (Optional) Graph drive id of any drive (library, OneDrive or group drive). Wins over user_id and site_url.

    • User ID or UPN user_id text

      (Optional) User id or UPN: that user's personal OneDrive. Used when no drive_id is given.

    • Site URL site_url text

      SharePoint site URL (https://contoso.sharepoint.com/sites/soc). Used when no drive_id or user_id is given.

    • Document Library library text

      (Optional) Document library name with site_url. Default: the site's default library (Documents).

    • Folder Path folder_path text

      (Optional) Folder path inside the library. Default: library root.

    • File Name file_name text required

      Name in SharePoint (no slashes).

    • Attachment attachment_id text required

      FortiSOAR attachment id, IRI or file IRI.

    • Chunk Size (KiB) chunk_size_kb integer

      Fragment size, a multiple of 320 (default 3200).

    Returns typeproperties
  • Execute Graph Request 4 params
    execute_api_request

    Call any Microsoft Graph v1.0 endpoint (pass-through). Graph errors come back as data (status_code, body).

    • Method method select required

      HTTP method.

      Options GETPOSTPATCHPUTDELETE
    • Endpoint endpoint text required

      Path under /v1.0, for example /sites/{id}/lists. Full Graph URLs are accepted; other hosts are refused.

    • Query Parameters (JSON) query_params text

      JSON object of query parameters.

    • Payload (JSON) payload text

      JSON body for POST, PATCH or PUT.

    Returns typeproperties
Something wrong with this item? Sign in to report

Report a problem

Sensitive data, copied content, broken imports, anything that shouldn't be here.

At least 10 characters. Please don't paste the sensitive value itself.0/1000