Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives


Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

Authorization failed. These requirements were not met: ClaimsAuthorizationRequirement:Claim.Type

Ask Question

I am getting the following error in .Net Core. after the user is authenticated succeefully.

Authorization failed. These requirements were not met: ClaimsAuthorizationRequirement:Claim.Type=

and sometimes if a user is using another browser then it is working. How to resolve that?

Thanks in advance!

According to the error message, you could find the reason why this user couldn't access the page is one of the claims is not match the Authorization requirement.

I guess one of your controller or razor page will check the client sent token's sid value. If the value is not match, it will not let the user access the page. This is a expected behavior. If you don't want it, I suggest you could check your Authorization requirement codes and modify it by yourself. More details about claim-based Authorization , you could refer to this article .

I am running into the same issue. For me, the api getting the bearer token rejects the connection as "bad request" saying Claim.Type=scope and Claim.Value is one of these types: (some-claim-name) . The some-claim-name scope is in the bearer token. Do I also need to pass in the scope name in the header? I thought the JWT having the right scope should be enough. Stack Undefined May 20, 2022 at 4:51

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question . Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers .