Mixed Authenication


I’m using Powershell Universal to create a piece of middleware sitting between two services, service A can fire requests in via the API, some processing is done and then service B can run another API request to pick up the output.

Part of the processing is to pick up the username of the user which is sending the request in so I am using windows authentication to pass the information through. So far so good.

However, an issue I have is that service B is unable to use Windows authentication so I am giving them an api token.

Unfortunately though it seems that if I enable anonymous authentication all the windows authenticated request are being rejected with the error

[10:53:06 ERR] ‘MS-ASPNETCORE-TOKEN’ does not match the expected pairing token {guid}, request rejected.

if I disable windows authentication then it works but the user information is not being passed through.

Does anyone know of a way to have my cake and eat it?