---
id: object/codeunit/9119
type: object
title: Codeunit 9119 "SharePoint Graph Client"
summary: Codeunit 9119 "SharePoint Graph Client" in System Application (System.Integration.Sharepoint). 68 public procedures. Introduced in BC28, still in BC30, changed in BC29.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: "28"
  last_changed: "29"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 671fde93401dbafbbc3cf4c6ececc8720f19674e602704b6cc8f6f00cfab7256
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/SharePoint/src/graph/SharePointGraphClient.Codeunit.al
    title: src/System Application/App/SharePoint/src/graph/SharePointGraphClient.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/8318
object_type: codeunit
object_id: 9119
name: SharePoint Graph Client
namespace: System.Integration.Sharepoint
app: System Application
extends: null
first_version: "28"
last_version: "30"
present_in:
  - "28"
  - "29"
  - "30"
changed_in:
  - "29"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 68
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 2
  called_by: 0
  implements: 0
---

# Codeunit 9119 "SharePoint Graph Client"

> Codeunit 9119 "SharePoint Graph Client" in System Application (System.Integration.Sharepoint). 68 public procedures. Introduced in BC28, still in BC30, changed in BC29.

System Application · System.Integration.Sharepoint · BC28-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/SharePoint/src/graph/SharePointGraphClient.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Public |

## Procedures

- `Initialize(NewSharePointUrl: Text; GraphAuthorization: Interface "Graph Authorization")`: Initializes SharePoint Graph client.
- `Initialize(NewSharePointUrl: Text; ApiVersion: Enum "Graph API Version"; GraphAuthorization: Interface "Graph Authorization")`: Initializes SharePoint Graph client with a specific API version.
- `Initialize(NewSharePointUrl: Text; BaseUrl: Text; GraphAuthorization: Interface "Graph Authorization")`: Initializes SharePoint Graph client with a custom base URL.
- `Initialize(NewSharePointUrl: Text; ApiVersion: Enum "Graph API Version"; GraphAuthorization: Interface "Graph Authorization"; HttpClientHandler: Interface "Http Client Handler")`: Initializes SharePoint Graph client with an HTTP client handler.
- `GetLists(var GraphLists: Record "SharePoint Graph List" temporary): Codeunit "SharePoint Graph Response"`: Gets all lists from the SharePoint site.
- `GetLists(var GraphLists: Record "SharePoint Graph List" temporary; GraphOptionalParameters: Codeunit "Graph Optional Parameters"): Codeunit "SharePoint Graph Response"`: Gets all lists from the SharePoint site.
- `GetList(ListId: Text; var GraphList: Record "SharePoint Graph List" temporary): Codeunit "SharePoint Graph Response"`: Gets a SharePoint list by ID.
- `GetList(ListId: Text; var GraphList: Record "SharePoint Graph List" temporary; GraphOptionalParameters: Codeunit "Graph Optional Parameters"): Codeunit "SharePoint Graph Response"`: Gets a SharePoint list by ID.
- `CreateList(DisplayName: Text; Description: Text; var GraphList: Record "SharePoint Graph List" temporary): Codeunit "SharePoint Graph Response"`: Creates a new SharePoint list.
- `CreateList(DisplayName: Text; ListTemplate: Text; Description: Text; var GraphList: Record "SharePoint Graph List" temporary): Codeunit "SharePoint Graph Response"`: Creates a new SharePoint list.
- `GetListItems(ListId: Text; var GraphListItems: Record "SharePoint Graph List Item" temporary): Codeunit "SharePoint Graph Response"`: Gets items from a SharePoint list.
- `GetListItems(ListId: Text; var GraphListItems: Record "SharePoint Graph List Item" temporary; GraphOptionalParameters: Codeunit "Graph Optional Parameters"): Codeunit "SharePoint Graph Response"`: Gets items from a SharePoint list.
- `CreateListItem(ListId: Text; FieldsJsonObject: JsonObject; var GraphListItem: Record "SharePoint Graph List Item" temporary): Codeunit "SharePoint Graph Response"`: Creates a new item in a SharePoint list.
- `CreateListItem(ListId: Text; Title: Text; var GraphListItem: Record "SharePoint Graph List Item" temporary): Codeunit "SharePoint Graph Response"`: Creates a new item in a SharePoint list with a simple title.
- `GetListItem(ListId: Text; ItemId: Text; var GraphListItem: Record "SharePoint Graph List Item" temporary): Codeunit "SharePoint Graph Response"`: Gets a single item from a SharePoint list.
- `GetListItem(ListId: Text; ItemId: Text; var GraphListItem: Record "SharePoint Graph List Item" temporary; GraphOptionalParameters: Codeunit "Graph Optional Parameters"): Codeunit "SharePoint Graph Response"`: Gets a single item from a SharePoint list.
- `UpdateListItem(ListId: Text; ItemId: Text; FieldsJsonObject: JsonObject; var GraphListItem: Record "SharePoint Graph List Item" temporary): Codeunit "SharePoint Graph Response"`: Updates an existing list item's fields.
- `GetDefaultDrive(var DriveId: Text): Codeunit "SharePoint Graph Response"`: Gets the default document library (drive) for the site.
- `GetDrives(var GraphDrives: Record "SharePoint Graph Drive" temporary): Codeunit "SharePoint Graph Response"`: Gets all drives (document libraries) available on the site with detailed information.
- `GetDrives(var GraphDrives: Record "SharePoint Graph Drive" temporary; GraphOptionalParameters: Codeunit "Graph Optional Parameters"): Codeunit "SharePoint Graph Response"`: Gets all drives (document libraries) available on the site with detailed information.
- `GetDrive(DriveId: Text; var GraphDrive: Record "SharePoint Graph Drive" temporary): Codeunit "SharePoint Graph Response"`: Gets a drive (document library) by ID with detailed information.
- `GetDrive(DriveId: Text; var GraphDrive: Record "SharePoint Graph Drive" temporary; GraphOptionalParameters: Codeunit "Graph Optional Parameters"): Codeunit "SharePoint Graph Response"`: Gets a drive (document library) by ID with detailed information.
- `GetDefaultDrive(var GraphDrive: Record "SharePoint Graph Drive" temporary): Codeunit "SharePoint Graph Response"`: Gets the default document library (drive) for the site with detailed information.
- `GetRootItems(var GraphDriveItems: Record "SharePoint Graph Drive Item" temporary): Codeunit "SharePoint Graph Response"`: Gets items in the root folder of the default drive.
- `GetRootItems(var GraphDriveItems: Record "SharePoint Graph Drive Item" temporary; GraphOptionalParameters: Codeunit "Graph Optional Parameters"): Codeunit "SharePoint Graph Response"`: Gets items in the root folder of the default drive.
- `GetFolderItems(FolderId: Text; var GraphDriveItems: Record "SharePoint Graph Drive Item" temporary): Codeunit "SharePoint Graph Response"`: Gets children of a folder by the folder's ID.
- `GetFolderItems(FolderId: Text; var GraphDriveItems: Record "SharePoint Graph Drive Item" temporary; GraphOptionalParameters: Codeunit "Graph Optional Parameters"): Codeunit "SharePoint Graph Response"`: Gets children of a folder by the folder's ID.
- `GetItemsByPath(FolderPath: Text; var GraphDriveItems: Record "SharePoint Graph Drive Item" temporary): Codeunit "SharePoint Graph Response"`: Gets items from a path in the default drive.
- `GetItemsByPath(FolderPath: Text; var GraphDriveItems: Record "SharePoint Graph Drive Item" temporary; GraphOptionalParameters: Codeunit "Graph Optional Parameters"): Codeunit "SharePoint Graph Response"`: Gets items from a path in the default drive.
- `GetDriveItem(ItemId: Text; var GraphDriveItem: Record "SharePoint Graph Drive Item" temporary): Codeunit "SharePoint Graph Response"`: Gets a file or folder by ID.
- `GetDriveItem(ItemId: Text; var GraphDriveItem: Record "SharePoint Graph Drive Item" temporary; GraphOptionalParameters: Codeunit "Graph Optional Parameters"): Codeunit "SharePoint Graph Response"`: Gets a file or folder by ID.
- `GetDriveItemByPath(ItemPath: Text; var GraphDriveItem: Record "SharePoint Graph Drive Item" temporary): Codeunit "SharePoint Graph Response"`: Gets a file or folder by path.
- `GetDriveItemByPath(ItemPath: Text; var GraphDriveItem: Record "SharePoint Graph Drive Item" temporary; GraphOptionalParameters: Codeunit "Graph Optional Parameters"): Codeunit "SharePoint Graph Response"`: Gets a file or folder by path.
- `CreateFolder(FolderPath: Text; FolderName: Text; var GraphDriveItem: Record "SharePoint Graph Drive Item" temporary): Codeunit "SharePoint Graph Response"`: Creates a new folder.
- `CreateFolder(FolderPath: Text; FolderName: Text; var GraphDriveItem: Record "SharePoint Graph Drive Item" temporary; ConflictBehavior: Enum "Graph ConflictBehavior"): Codeunit "SharePoint Graph Response"`: Creates a new folder with specified conflict behavior.
- `CreateFolder(DriveId: Text; FolderPath: Text; FolderName: Text; var GraphDriveItem: Record "SharePoint Graph Drive Item" temporary): Codeunit "SharePoint Graph Response"`: Creates a new folder in a specific drive (document library).
- `CreateFolder(DriveId: Text; FolderPath: Text; FolderName: Text; var GraphDriveItem: Record "SharePoint Graph Drive Item" temporary; ConflictBehavior: Enum "Graph ConflictBehavior"): Codeunit "SharePoint Graph Response"`: Creates a new folder in a specific drive (document library) with specified conflict behavior.
- `UploadFile(FolderPath: Text; FileName: Text; FileInStream: InStream; var GraphDriveItem: Record "SharePoint Graph Drive Item" temporary): Codeunit "SharePoint Graph Response"`: Uploads a file to a folder on the default drive.
- `UploadFile(FolderPath: Text; FileName: Text; FileInStream: InStream; var GraphDriveItem: Record "SharePoint Graph Drive Item" temporary; ConflictBehavior: Enum "Graph ConflictBehavior"): Codeunit "SharePoint Graph Response"`: Uploads a file to a folder on the default drive with specified conflict behavior.
- `UploadFile(DriveId: Text; FolderPath: Text; FileName: Text; FileInStream: InStream; var GraphDriveItem: Record "SharePoint Graph Drive Item" temporary): Codeunit "SharePoint Graph Response"`: Uploads a file to a folder in a specific drive (document library).
- `UploadFile(DriveId: Text; FolderPath: Text; FileName: Text; FileInStream: InStream; var GraphDriveItem: Record "SharePoint Graph Drive Item" temporary; ConflictBehavior: Enum "Graph ConflictBehavior"): Codeunit "SharePoint Graph Response"`: Uploads a file to a folder in a specific drive (document library) with specified conflict behavior.
- `DownloadFile(ItemId: Text; var TempBlob: Codeunit "Temp Blob"): Codeunit "SharePoint Graph Response"`: Downloads a file.
- `DownloadFileByPath(FilePath: Text; var TempBlob: Codeunit "Temp Blob"): Codeunit "SharePoint Graph Response"`: Downloads a file by path.
- `DownloadLargeFile(ItemId: Text; var TempBlob: Codeunit "Temp Blob"): Codeunit "SharePoint Graph Response"`: Downloads a large file using chunked download for files larger than Business Central's 150MB HTTP response limit.
- `DownloadLargeFileByPath(FilePath: Text; var TempBlob: Codeunit "Temp Blob"): Codeunit "SharePoint Graph Response"`: Downloads a large file by path using chunked download for files larger than Business Central's 150MB HTTP response limit.
- `UploadLargeFile(FolderPath: Text; FileName: Text; FileInStream: InStream; var GraphDriveItem: Record "SharePoint Graph Drive Item" temporary): Codeunit "SharePoint Graph Response"`: Uploads a large file to a folder on the default drive using chunked upload for improved performance and reliability.
- `UploadLargeFile(FolderPath: Text; FileName: Text; FileInStream: InStream; var GraphDriveItem: Record "SharePoint Graph Drive Item" temporary; ConflictBehavior: Enum "Graph ConflictBehavior"): Codeunit "SharePoint Graph Response"`: Uploads a large file to a folder on the default drive using chunked upload with specified conflict behavior.
- `UploadLargeFile(DriveId: Text; FolderPath: Text; FileName: Text; FileInStream: InStream; var GraphDriveItem: Record "SharePoint Graph Drive Item" temporary): Codeunit "SharePoint Graph Response"`: Uploads a large file to a folder in a specific drive (document library) using chunked upload.
- `UploadLargeFile(DriveId: Text; FolderPath: Text; FileName: Text; FileInStream: InStream; var GraphDriveItem: Record "SharePoint Graph Drive Item" temporary; ConflictBehavior: Enum "Graph ConflictBehavior"): Codeunit "SharePoint Graph Response"`: Uploads a large file to a folder in a specific drive (document library) using chunked upload with specified conflict behavior.
- `DeleteItem(ItemId: Text): Codeunit "SharePoint Graph Response"`: Deletes a drive item (file or folder) by ID.
- `DeleteItemByPath(ItemPath: Text): Codeunit "SharePoint Graph Response"`: Deletes a drive item (file or folder) by path.
- `ItemExists(ItemId: Text; var Exists: Boolean): Codeunit "SharePoint Graph Response"`: Checks if a drive item (file or folder) exists by ID.
- `ItemExistsByPath(ItemPath: Text; var Exists: Boolean): Codeunit "SharePoint Graph Response"`: Checks if a drive item (file or folder) exists by path.
- `CopyItem(ItemId: Text; TargetFolderId: Text; NewName: Text): Codeunit "SharePoint Graph Response"`: Copies a drive item (file or folder) to a new location by ID.
- `CopyItemByPath(ItemPath: Text; TargetFolderPath: Text; NewName: Text): Codeunit "SharePoint Graph Response"`: Copies a drive item (file or folder) to a new location by path.
- `MoveItem(ItemId: Text; TargetFolderId: Text; NewName: Text): Codeunit "SharePoint Graph Response"`: Moves a drive item (file or folder) to a new location by ID.
- `MoveItemByPath(ItemPath: Text; TargetFolderPath: Text; NewName: Text): Codeunit "SharePoint Graph Response"`: Moves a drive item (file or folder) to a new location by path.
- `UpdateDriveItem(ItemId: Text; UpdatePropertiesJsonObject: JsonObject; var GraphDriveItem: Record "SharePoint Graph Drive Item" temporary): Codeunit "SharePoint Graph Response"`: Updates a drive item's properties (name, description, etc.) by ID.
- `UpdateDriveItemByPath(ItemPath: Text; UpdatePropertiesJsonObject: JsonObject; var GraphDriveItem: Record "SharePoint Graph Drive Item" temporary): Codeunit "SharePoint Graph Response"`: Updates a drive item's properties (name, description, etc.) by path.
- `RenameDriveItem(ItemId: Text; NewName: Text; var GraphDriveItem: Record "SharePoint Graph Drive Item" temporary): Codeunit "SharePoint Graph Response"`: Renames a drive item by ID.
- `RenameDriveItemByPath(ItemPath: Text; NewName: Text; var GraphDriveItem: Record "SharePoint Graph Drive Item" temporary): Codeunit "SharePoint Graph Response"`: Renames a drive item by path.
- `SetODataFilter(var GraphOptionalParameters: Codeunit "Graph Optional Parameters"; Filter: Text)`: Creates an OData query to filter items in SharePoint
- `SetODataSelect(var GraphOptionalParameters: Codeunit "Graph Optional Parameters"; Select: Text)`: Creates an OData query to select specific fields from items in SharePoint
- `SetODataExpand(var GraphOptionalParameters: Codeunit "Graph Optional Parameters"; Expand: Text)`: Creates an OData query to expand related entities in SharePoint
- `SetODataOrderBy(var GraphOptionalParameters: Codeunit "Graph Optional Parameters"; OrderBy: Text)`: Creates an OData query to order results in SharePoint
- `GetDiagnostics(): Interface "HTTP Diagnostics"`: Returns detailed information on last API call.
- `SetSiteIdForTesting(SiteId: Text)` (internal): Sets the site ID directly for testing purposes.
- `SetDefaultDriveIdForTesting(DefaultDriveId: Text)` (internal): Sets the default drive ID directly for testing purposes.

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 9120 "SharePoint Graph Client Impl."](../codeunit/9120.md) (38 calls: `CopyItem → CopyItem`, `CopyItemByPath → CopyItemByPath`, `CreateFolder → CreateFolder`, …)
- [Codeunit 9353 "Graph Optional Parameters"](../codeunit/9353.md) (4 calls: `SetODataExpand → SetODataQueryParameter`, `SetODataFilter → SetODataQueryParameter`, `SetODataOrderBy → SetODataQueryParameter`, …)

## Recent changes

- 2026-08-17 [#8318 SharePoint Graph Module - extend functionality with additional methods](../../changes/bcapps/8318.md) (main, BC30, feature)

## Across versions

- Present in: BC28-30
- Changed (declaration) in: BC29

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "SharePoint Graph Client")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
