> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# Get File

- Component: `appmixer.microsoft.sharepoint.GetFile`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.microsoft.sharepoint 3.1.0](https://connectors.appmixer.com/connector/appmixer.microsoft.sharepoint/3.1.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.microsoft.sharepoint/3.1.0/component/appmixer.microsoft.sharepoint.GetFile>

Retrieve a file from Microsoft SharePoint.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Item ID (`itemId`) | text | ID assigned to a file or folder in SharePoint. |
| Item Path (`itemPath`) | text | Path of a file or folder in SharePoint**(Ignored if 'Item ID' is set)**. Example: `path/to/file/file.pdf`. |
| Site ID (`siteId`) | text | Provide a site ID. |
| Drive ID (`driveId`) | text | ID of the drive where the file is located. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| ID (`id`) | string | - |
| Name (`name`) | string | - |
| Date Created (`createdDateTime`) | string | - |
| `cTag` | string | - |
| `eTag` | string | - |
| Last Modified Date (`lastModifiedDateTime`) | string | - |
| Size (`size`) | number | - |
| Web URL (`webUrl`) | string | - |
| Reactions (`reactions`) | object | - |
| Comment Count (`reactions.commentCount`) | number | - |
| Created By (`createdBy`) | object | - |
| `createdBy.application` | object | - |
| `createdBy.application.id` | string | - |
| `createdBy.user` | object | - |
| `createdBy.user.id` | string | - |
| `createdBy.user.displayName` | string | - |
| Modified By (`lastModifiedBy`) | object | - |
| `lastModifiedBy.application` | object | - |
| `lastModifiedBy.application.id` | string | - |
| `lastModifiedBy.user` | object | - |
| `lastModifiedBy.user.id` | string | - |
| `lastModifiedBy.user.displayName` | string | - |
| Parent Reference (`parentReference`) | object | - |
| File (`file`) | object | - |
| Mime Type (`file.mimeType`) | string | - |
| File Hashes (`file.hashes`) | object | - |
| File System Info (`fileSystemInfo`) | object | - |
| Image (`image`) | object | - |
| Photo (`photo`) | object | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.microsoft.sharepoint.GetFile",
  "label": "Get File",
  "author": "Harsha Surisetty <harsha@client.io>",
  "description": "Retrieve a file from Microsoft SharePoint.",
  "private": false,
  "auth": {
    "service": "appmixer:microsoft",
    "scope": [
      "Files.Read.All",
      "Sites.Read.All"
    ]
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "siteId": {
            "type": "string"
          },
          "driveId": {
            "type": "string"
          },
          "itemId": {
            "type": "string"
          },
          "itemPath": {
            "type": "string"
          }
        },
        "required": [
          "driveId",
          "siteId"
        ],
        "oneOf": [
          {
            "required": [
              "itemPath"
            ]
          },
          {
            "required": [
              "itemId"
            ]
          }
        ]
      },
      "inspector": {
        "inputs": {
          "itemId": {
            "type": "text",
            "index": 4,
            "label": "Item ID",
            "group": "item",
            "tooltip": "ID assigned to a file or folder in SharePoint."
          },
          "itemPath": {
            "type": "text",
            "index": 3,
            "label": "Item Path",
            "group": "item",
            "tooltip": "Path of a file or folder in SharePoint<b>(Ignored if 'Item ID' is set)</b>. Example: <code>path/to/file/file.pdf</code>."
          },
          "siteId": {
            "type": "text",
            "label": " Site ID",
            "group": "drive",
            "index": 1,
            "tooltip": "Provide a site ID.",
            "source": {
              "url": "/component/appmixer/microsoft/sharepoint/ListSites?outPort=out",
              "data": {
                "transform": "./ListSites#sitesToSelectArray"
              }
            }
          },
          "driveId": {
            "type": "text",
            "index": 2,
            "label": "Drive ID",
            "group": "drive",
            "tooltip": "ID of the drive where the file is located.",
            "source": {
              "url": "/component/appmixer/microsoft/sharepoint/ListDrives?outPort=out",
              "data": {
                "messages": {
                  "in/siteId": "inputs/in/siteId"
                },
                "transform": "./ListDrives#drivesToSelectArray"
              }
            }
          }
        },
        "groups": {
          "drive": {
            "label": "Drive",
            "index": 1
          },
          "item": {
            "label": "Item",
            "index": 2
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "options": [
        {
          "label": "ID",
          "value": "id",
          "schema": {
            "type": "string",
            "example": "01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K"
          }
        },
        {
          "label": "Name",
          "value": "name",
          "schema": {
            "type": "string",
            "example": "Q3-report.pdf"
          }
        },
        {
          "label": "Date Created",
          "value": "createdDateTime",
          "schema": {
            "type": "string",
            "example": "2026-03-12T09:41:27Z"
          }
        },
        {
          "label": "cTag",
          "value": "cTag",
          "schema": {
            "type": "string",
            "example": "\"c:{4E5F6A7B-8C9D-4E0F-A1B2-C3D4E5F6A7B8},2\""
          }
        },
        {
          "label": "eTag",
          "value": "eTag",
          "schema": {
            "type": "string",
            "example": "\"{4E5F6A7B-8C9D-4E0F-A1B2-C3D4E5F6A7B8},2\""
          }
        },
        {
          "label": "Last Modified Date",
          "value": "lastModifiedDateTime",
          "schema": {
            "type": "string",
            "example": "2026-03-12T10:05:13Z"
          }
        },
        {
          "label": "Size",
          "value": "size",
          "schema": {
            "type": "number",
            "example": 184213
          }
        },
        {
          "label": "Web URL",
          "value": "webUrl",
          "schema": {
            "type": "string",
            "example": "https://contoso.sharepoint.com/sites/Marketing/Shared%20Documents/Reports/Q3-report.pdf"
          }
        },
        {
          "label": "Reactions",
          "value": "reactions",
          "schema": {
            "type": "object",
            "example": {
              "commentCount": 0
            }
          }
        },
        {
          "label": "Comment Count",
          "value": "reactions.commentCount",
          "schema": {
            "type": "number",
            "example": 0
          }
        },
        {
          "label": "Created By",
          "value": "createdBy",
          "schema": {
            "type": "object",
            "example": {
              "application": {
                "id": "cc15fd57-2c6c-4117-a88c-83b1d56b4bbe",
                "displayName": "Microsoft Teams Services"
              },
              "user": {
                "email": "megan.bowen@contoso.com",
                "id": "48d31887-5fad-4d73-a9f5-3c356e68a038",
                "displayName": "Megan Bowen"
              }
            }
          }
        },
        {
          "label": "createdBy.application",
          "value": "createdBy.application",
          "schema": {
            "type": "object",
            "example": {
              "id": "cc15fd57-2c6c-4117-a88c-83b1d56b4bbe",
              "displayName": "Microsoft Teams Services"
            }
          }
        },
        {
          "label": "createdBy.application.id",
          "value": "createdBy.application.id",
          "schema": {
            "type": "string",
            "example": "cc15fd57-2c6c-4117-a88c-83b1d56b4bbe"
          }
        },
        {
          "label": "createdBy.user",
          "value": "createdBy.user",
          "schema": {
            "type": "object",
            "example": {
              "email": "megan.bowen@contoso.com",
              "id": "48d31887-5fad-4d73-a9f5-3c356e68a038",
              "displayName": "Megan Bowen"
            }
          }
        },
        {
          "label": "createdBy.user.id",
          "value": "createdBy.user.id",
          "schema": {
            "type": "string",
            "example": "48d31887-5fad-4d73-a9f5-3c356e68a038"
          }
        },
        {
          "label": "createdBy.user.displayName",
          "value": "createdBy.user.displayName",
          "schema": {
            "type": "string",
            "example": "Megan Bowen"
          }
        },
        {
          "label": "Modified By",
          "value": "lastModifiedBy",
          "schema": {
            "type": "object",
            "example": {
              "application": {
                "id": "cc15fd57-2c6c-4117-a88c-83b1d56b4bbe",
                "displayName": "Microsoft Teams Services"
              },
              "user": {
                "email": "megan.bowen@contoso.com",
                "id": "48d31887-5fad-4d73-a9f5-3c356e68a038",
                "displayName": "Megan Bowen"
              }
            }
          }
        },
        {
          "label": "lastModifiedBy.application",
          "value": "lastModifiedBy.application",
          "schema": {
            "type": "object",
            "example": {
              "id": "cc15fd57-2c6c-4117-a88c-83b1d56b4bbe",
              "displayName": "Microsoft Teams Services"
            }
          }
        },
        {
          "label": "lastModifiedBy.application.id",
          "value": "lastModifiedBy.application.id",
          "schema": {
            "type": "string",
            "example": "cc15fd57-2c6c-4117-a88c-83b1d56b4bbe"
          }
        },
        {
          "label": "lastModifiedBy.user",
          "value": "lastModifiedBy.user",
          "schema": {
            "type": "object",
            "example": {
              "email": "megan.bowen@contoso.com",
              "id": "48d31887-5fad-4d73-a9f5-3c356e68a038",
              "displayName": "Megan Bowen"
            }
          }
        },
        {
          "label": "lastModifiedBy.user.id",
          "value": "lastModifiedBy.user.id",
          "schema": {
            "type": "string",
            "example": "48d31887-5fad-4d73-a9f5-3c356e68a038"
          }
        },
        {
          "label": "lastModifiedBy.user.displayName",
          "value": "lastModifiedBy.user.displayName",
          "schema": {
            "type": "string",
            "example": "Megan Bowen"
          }
        },
        {
          "label": "Parent Reference",
          "value": "parentReference",
          "schema": {
            "type": "object",
            "example": {
              "driveType": "documentLibrary",
              "driveId": "b!-RIj2DuyvEyV1T4NlOaMHk8XkS_I8MdFlUCq1BlcjgmhRfAj3-Z8RY2VpuvV_tpd",
              "id": "01BYE5RZ5MYLM2SMX75ZBIPQZIHT6OAYPB",
              "path": "/drives/b!-RIj2DuyvEyV1T4NlOaMHk8XkS_I8MdFlUCq1BlcjgmhRfAj3-Z8RY2VpuvV_tpd/root:/Reports",
              "siteId": "2c712604-1370-44e7-a1f5-426573fda80a"
            }
          }
        },
        {
          "label": "File",
          "value": "file",
          "schema": {
            "type": "object",
            "example": {
              "mimeType": "application/pdf",
              "hashes": {
                "quickXorHash": "dF5ZsBeIxH2TmGCKUf6Pk9PMUkE="
              }
            }
          }
        },
        {
          "label": "Mime Type",
          "value": "file.mimeType",
          "schema": {
            "type": "string",
            "example": "application/pdf"
          }
        },
        {
          "label": "File Hashes",
          "value": "file.hashes",
          "schema": {
            "type": "object",
            "example": {
              "quickXorHash": "dF5ZsBeIxH2TmGCKUf6Pk9PMUkE="
            }
          }
        },
        {
          "label": "File System Info",
          "value": "fileSystemInfo",
          "schema": {
            "type": "object",
            "example": {
              "createdDateTime": "2026-03-12T09:41:27Z",
              "lastModifiedDateTime": "2026-03-12T10:05:13Z"
            }
          }
        },
        {
          "label": "Image",
          "value": "image",
          "schema": {
            "type": "object",
            "example": {
              "height": 1080,
              "width": 1920
            }
          }
        },
        {
          "label": "Photo",
          "value": "photo",
          "schema": {
            "type": "object",
            "example": {
              "takenDateTime": "2026-03-10T14:22:05Z",
              "cameraMake": "Apple",
              "cameraModel": "iPhone 15 Pro"
            }
          }
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
