Web API Authentication Issue

Avtandil Prangulashvili 1 Reputation point
2022-02-04T13:41:03.14+00:00

Hello
I created WEB API project in VS and Authentication type I choose is Individual User Account.
After that I created one model class and controller which has [Authorize] parameter on get data method for testing. Everything has default configuration in web.config and etc.

Problem: When I start project and trying to test with Postman basic authentication it returns Unauthorized 401 status, but when I trying to remove [Authorize] attribute it works well. When I use Postman for authorization I choose Basic Auth and in username and password field I use for example user name: user@Karima ben .com and password: 123123. This user and password is registered in local database already.

Microsoft Partner Center API
Microsoft Partner Center API
Microsoft Partner Center: A Microsoft website for partners that provides access to product support, a partner community, and other partner services.API: A software intermediary that allows two applications to interact with each other.
345 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.