Published Folders & Auth

Product: PowerShell Universal
Version: 1.4.6

How does authentication work with Public Folders? Can you pass in a token like a SAS token? I.e. I want to download a file from PSU in a Bicep deployment.

You can use app tokens to connect to the published folders. That said, we only support them in the headers. We will be adding query string app tokens in 3.6.

Header Auth

Invoke-RestMethod http://localhost:5000/publishedFolder/myFile.txt -Headers @{ Authorization = "Bearer tokenHere" } 

Query String

Invoke-RestMethod "http://localhost:5000/publishedFolder/myFile.txt?access_token=tokenHere"