I’m trying to access a custom API with authentication from a Dashboard.
I’ve searched around and found a post suggesting you could pass the $Headers variable to the headers parameter but that results in an error “The header name format is invalid”, I eventually found out that it’s a dictionary(System.Collections.Generic.Dictionary`2) instead of a Hashtable, no clue if that’s could be the issue or not.
I then tried passing just the cookie, both using -Header @{Cookie=$Cookie} -Header $Cookie and -Header @{Cookie=$Headers[‘Cookie’]} but all result in a 401.
I’m using WS-Federation as the authentication, and running PSU standalone. Any idea of what I’m doing wrong? It all works fine with Pages, unfortunately it doesn’t really support the usecase I want so that’s not an option for me.
Product: PowerShell Universal
Version: 3.0.0-rtm1