REST API setup and auth in an IIS configuration

I’ve got some REST API code i’m ready to implement with my UD site that runs off IIS instance, with Windows Authentication and claims based rights setup for the pages. I’ve reviewed the documentation as well as some of the topics around the forums, but i’m having trouble getting it to work.

I’ve been attempting an invoke-restmethod to login, but get a 401.2 when i attempt this. Creds are mine, so they have full admin rights to the site itself.

$login = Invoke-RestMethod -Uri https://wfa.domain.local/login -Method POST -Body (@{ username = "user"; password = 'password' } | ConvertTo-Json) -SessionVariable "Session"

bump ! I have the very same problem, API is working well started from a prompt, but generating 401 when started from IIS. would love to have some explanation :slight_smile:
Cheers !

Can you open an issue for this? I haven’t tried to do this before so it could be a bug. Issue will help track it.

my particular issue i bypassed by shifting over to utilize Universal Automation for the API functionality I wanted, so I shifted to utilizing token based auth.

1 Like