---
id: object/codeunit/9762
type: object
title: Codeunit 9762 "SFTP Client"
summary: Codeunit 9762 "SFTP Client" in System Application (System.SFTPClient). 17 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: 9d503cb8d6bd6e53181957a6ac10a4eb60501fe94500ca994aca06588dbab29f
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/SFTP%20Client/src/SFTPClient.Codeunit.al
    title: src/System Application/App/SFTP Client/src/SFTPClient.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/9360
object_type: codeunit
object_id: 9762
name: SFTP Client
namespace: System.SFTPClient
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: 17
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 0
  implements: 0
---

# Codeunit 9762 "SFTP Client"

> Codeunit 9762 "SFTP Client" in System Application (System.SFTPClient). 17 public procedures. Introduced in BC28, still in BC30, changed in BC29.

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

## Properties

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

## Procedures

- `AddFingerprintSHA256(Fingerprint: Text)`: Adds a SHA256 fingerprint to the list of accepted host key fingerprints.
- `AddFingerprintMD5(Fingerprint: Text)` (obsolete 29.0: MD5 host key fingerprints are cryptographically insecure and are no longer supported. Use AddFingerprintSHA256 instead.): Obsolete. MD5 host key fingerprints are cryptographically insecure and are no longer supported. Calling this method always raises an error. Use AddFingerprintSHA256 instead.
- `Initialize(Hostname: Text; Port: Integer; Username: Text; Password: SecretText): Codeunit "SFTP Operation Response"`: Initializes the SFTP client with the specified parameters. The client is connected to the server.
- `Initialize(HostName: Text; Port: Integer; Username: Text; PrivateKey: InStream): Codeunit "SFTP Operation Response"`: Initializes the SFTP client with the specified parameters. The client is connected to the server. The private key is used for authentication.
- `Initialize(HostName: Text; Port: Integer; Username: Text; PrivateKey: InStream; Passphrase: SecretText): Codeunit "SFTP Operation Response"`: Initializes the SFTP client with the specified parameters. The client is connected to the server. The private key is used for authentication and a passphrase is required to decrypt the private key.
- `ListFiles(Path: Text; var FileList: List of [Interface "ISFTP File"]): Codeunit "SFTP Operation Response"`: Lists the files in the specified path on the SFTP server. The result is returned as a list of SFTP File interfaces.
- `ListFiles(Path: Text; var FileList: Record "SFTP Folder Content"): Codeunit "SFTP Operation Response"`: Lists the files in the specified path on the SFTP server. The result is returned as a record of type "SFTP Folder Content".
- `GetFileAsStream(Path: Text; var InStream: InStream): Codeunit "SFTP Operation Response"`: Downloads a file from the SFTP server and returns it as an InStream.
- `DeleteFile(Path: Text): Codeunit "SFTP Operation Response"`: Deletes a file on the SFTP server.
- `FileExists(Path: Text; var Result: Boolean): Codeunit "SFTP Operation Response"`: Tests if a file exists on the SFTP server.
- `MoveFile(SourcePath: Text; DestinationPath: Text): Codeunit "SFTP Operation Response"`: Moves a file from one path to another on the SFTP server.
- `Disconnect()`: Disconnects the SFTP client from the server. This method should be called when the client is no longer needed.
- `PutFileStream(Path: Text; var SourceInStream: InStream): Codeunit "SFTP Operation Response"`: Uploads a file to the SFTP server from an InStream.
- `GetWorkingDirectory(var Result: Text): Codeunit "SFTP Operation Response"`: Returns the working directory of the SFTP client. This is the directory that the client is currently working in.
- `SetWorkingDirectory(Path: Text): Codeunit "SFTP Operation Response"`: Sets the working directory of the SFTP client. This is the directory that the client will work in for subsequent operations.
- `IsConnected(): Boolean`: Checks if the SFTP client is connected to the server. This method can be used to verify the connection status before performing operations.
- `CreateDirectory(Path: Text): Codeunit "SFTP Operation Response"`: Creates a new directory on the SFTP server.

## 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 9763 "SFTP Client Implementation"](../codeunit/9763.md) (13 calls: `AddFingerprintSHA256 → AddFingerPrintSHA256`, `CreateDirectory → CreateDirectory`, `DeleteFile → DeleteFile`, …)

## Recent changes

- 2026-08-12 [#9360 Harden SFTP Client module (security review phase 1)](../../changes/bcapps/9360.md) (main, BC30, fix)

## Across versions

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

## Deprecations

- procedure AddFingerprintMD5: Pending 29.0 (#if not CLEAN29), "MD5 host key fingerprints are cryptographically insecure and are no longer supported. Use AddFingerprintSHA256 instead."

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: "SFTP Client")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
