Please help me, I’m getting desperate.
I have built a .net core asp.net API using windows authentication. In it I have a simple endpoint that should return the windows user identity. When I run the API and navigate to the endpoint with the browser it works, and it returns my identity, but when I call the endpoint with postman, I get an unauthorized response.
This isn’t a code support forum, but here’s some of the related code if you are interested: // Program.csWebApplicationBuilder builder = WebApplication.CreateBuilder(ar - Pastebin.com
I have tried it on multiple other computers with people in my team, and it works as intended for them, and they get the correct 200 response. I can’t for the life of me figure out what I’m doing wrong…
Please help me!
Just to clarify, it works ok for your colleagues using Postman?
It looks like you have a username\password in the authentication.
What happens if you type your username\password into the authentication on a colleagues session and vice versa. Just to rule out the account.
I tried this today, but the endpoint still said it was his user accessing it. So we even tried to call it without any credentials provided in postman, and it still worked and said it was his user accessing it, so it probably uses the actual logged in user and not the credentials from postman
So how about if you login to a colleagues machine just to rule out the device\postman installation.
If it works on a colleagues machine with your credentials, then it will be your device\postman installation.
If it doesn’t work on a colleagues device, then its more likely to be an issue with your account.