SFTP Action step cannot find MID Server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2025 02:27 AM
Hi,
I am trying to send an attachment to an SFTP Server and get the following error:
Attachment does not exist or user does not have read permission on attachment with sysid af4508ce110f12d07d0b60ba819b8ac
According to Support, this is because the MID Server doesn't have sufficient roles to read the attachment file. However, I don't think the MID Server is being contacted for some reason. (Note: Capabilities was previously set to SSH, but neither option works.)
I think the auto-selection of MID Server fails for some reason. Looking at the Action data in the flow execution, I have a 'Runtime MID Server' at the top, but this refers to a record on the ecc_agent table.
According to the Support KB above, the MID Server should really be a user. We do have MID Server users, but neither of them has been selected in the flow:
To complicate matters, it is true that the MID Server users do not have access to the attachment record. They can only access the Service Portal, which is strange since they have plenty of roles including snc_internal. But I still think the problem is the empty MID Server field above.
Many happy thumbs will be dealt to anyone who can help me solve this.
Regards,
Kim
PS. I have not tried manually selecting a MID Server, but this is something that we want to avoid (we would have to pass it in as a data pill with different configurations for different instances). Also let me point out that the attachment is created and there was ONE success two months ago sending it the SFTP server, meaning that the code works as intended.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2025 02:39 AM
What changed in between?
Did you recently upgrade?
I could see the flow is able to get the attachment record?
How is the flow/subflow configured to run? Run as System ?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2025 03:33 AM
The flow is configured to run as System user. There have been no upgrades in-between. Yes, the attachment record is created and retrieved correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2025 02:45 AM
I understand that you want to avoid selecting things manually, but try it for testing purposes. Also: grant the MID Server user the access to the attachment. You are describing a lot of things that could be the cause, but you first need to pinpoint to the exact cause to create a solution. If it works after granting access to the attachment, you know you need to grant that role to the user. If it works when selecting a MID server manually, you know where the problem is and can work to a solution.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2025 04:49 AM
I changed the action to receive a user reference variable (the MID Server). Now the action says it cannot locate the server:
The MID Server field is no longer empty, it is clearly the reference to the MID Server user.
Not sure what is going on, the user has User ID and first name and last name set, most other fields are empty but it has all the roles it should need to access the attachment record.