Offline Drop Network Share with Authentication


Can’t seem to find any documentation on this… We are trying to use an offline drop and Azure Files (hosted network share effectively) which uses a set username and password to access the network share… How does a network path with authentication work with Octopus?

I can access the network share on the local Octopus server but trying to do a health check fails with:

Could not find a part of the path ‘\\folder’.



Hi Chris,

Thanks for getting in touch! I hope you are well :slight_smile:
I am sorry but Offline drops targets won’t work with drives that require authentication. It needs to be read-writable by the user that runs the Octopus service, and cannot need to authenticate.
You could attempt to write to a local directory and script a transfer with authentication.

Sorry if that wasn’t the news you were hoping for.

Hey Vanessa (and everyone else).

Managed a work around… a little hacky but it does the job. We are using this to deploy to network share and an offline drop. We have a project that runs everytime the server boots up and then this allows us to do the above. Powershell script below:

$User = "Network Share Username"
$PWord = ConvertTo-SecureString -String "Network Password" -AsPlainText -Force
$Credential = New-Object -TypeName "System.Management.Automation.PSCredential" -ArgumentList $User, $PWord

New-PSDrive -Name Z -PSProvider FileSystem -scope Global -Root **network path** -Credential $Credential

If (Test-Path "Local Path"){
  cmd /c rmdir Local Path

New-Item -Path Local Path -ItemType SymbolicLink -Value Z: