Skip to main content
Post a question

Notifications

Community site session details

Community site session details

Session Id : uNFPRAp7Eii0jhK4HIMKBc
FastTrack for Dynamics 365 forum
Suggested answer

SFTP Connection

Like (1) ShareShare
ReportReport
Posted on 20 Mar 2025 07:24:20 by 15

Hi

We had a requirement to export vendor payment files to BANK SFTP folder 

For the SFTP connection, I have a Username, host, port and private key (.ppk format file)

How can I achieve this using X++? 

I refer multiple forums and tried to specify the path given in the private key path, but in run time it shows the error "Invalid private key"

Categories:
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    19,304 Super User 2025 Season 1 on 26 Mar 2025 at 22:15:42
    SFTP Connection
     
    Is your issue fixed? If yes, then please verify the answers that helped
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    19,304 Super User 2025 Season 1 on 20 Mar 2025 at 10:11:10
    SFTP Connection
     
    Yes you can encrypt your file and send it to PA and then PA will put it in SFTP.
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • NN-26110709-0 Profile Picture
    15 on 20 Mar 2025 at 09:49:09
    SFTP Connection
    Hi Mohamed

    I need send file as encrypted, but it is possible through Power automate
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    19,304 Super User 2025 Season 1 on 20 Mar 2025 at 09:39:27
    SFTP Connection
     
    I think you need to upload the files to SFTP via Bussines Event and power automate.

    or you can develop a DLL to connect to SFTP if you don't want to use PA.
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • NN-26110709-0 Profile Picture
    15 on 20 Mar 2025 at 08:50:59
    SFTP Connection
    Hi Andre I was attached my code i am giving filepath and direct key but both time i am facing same error
     
     
  • AndrĂ© Arnaud de Calavon Profile Picture
    293,333 Super User 2025 Season 1 on 20 Mar 2025 at 08:31:28
    SFTP Connection
    Hi,
     
    Can you share the code you used? Are you using a third-party dll to connect to SFTP folders?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,333 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,276 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans
Loading started