Did you add roles while creating the JWT token? If its not added then authorization attribute will show unauthorize. Please check it once and show how you have impmemented authorization in your program.cs so can go more further.