Sleepw4lker / TameMyCerts.REST

REST API for Microsoft Active Directory Certificate Services
Apache License 2.0
20 stars 1 forks source link

Forbid method expects authentication scheme #3

Open kruhmann opened 6 months ago

kruhmann commented 6 months ago

Hi,

I tried to get information for a template without having enroll permission. In this case a 500 server error is returned. It seems that the Forbid method (https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.controllerbase.forbid?view=aspnetcore-8.0) expects an authentication scheme and does not accept an error message (without special handling).

image

Maybe it is possible to switch the response to Unauthorized. Then the RestAPI remains clean and simple.

Kind regards Konstantin