Activities of "petri.t"

I recently upgraded my project from ABP 10.0.2 to 10.1.1. With that upgrade swagger authentication stopped working. MVC UI and my external UI using bearer token both works without problems, so problem is limited to swagger. I'm able to reproduce the problem with new application created with cli:

abp --version 2.2.1

abp new AbpTestApp --tiered

  • start the project in ABP Studio
  • inside ABP Studio browse HttpApi.Host project
  • Click authorize
  • Select AbpTestApp scope
  • Click Authorize and login with admin (both username and password are prefilled)
  • Close authorization window
  • Browse to UserLookup service
  • GET /api/identity/users/lookup/count
  • Try it out & Execute

Error: response status is 401

Curl example in swagger (missing Authorization header):

curl -X 'GET'
'https://localhost:44307/api/identity/users/lookup/count'
-H 'accept: text/plain'
-H 'RequestVerificationToken: CfDJ8BYhVJtGAV5HrK9f45y0riMpUpsXcJ4DfPeR7pqUE6yne9Y2CxHdVTSKW_T3GNLRh853u24OP2gC6AO3fp2-9-rB5Osrmjr5YiCa7d1jmcaevFC1h-cWRnJoZY0QmnRRLmHRvDfOz2tNPJpXFvZpOkM'
-H 'X-Requested-With: XMLHttpRequest'

Logs:

10/03/2026 13.16.32 [Information] Request starting "HTTP/2" "GET" "https"://"localhost:44307""""/api/identity/users/lookup/count""" - null null 10/03/2026 13.16.32 [Debug] Starting resolving tenant... 10/03/2026 13.16.32 [Debug] Trying to resolve tenant through '"CurrentUser"'... 10/03/2026 13.16.32 [Debug] Trying to resolve tenant through '"QueryString"'... 10/03/2026 13.16.32 [Debug] Trying to resolve tenant through '"Route"'... 10/03/2026 13.16.32 [Debug] Trying to resolve tenant through '"Header"'... 10/03/2026 13.16.32 [Debug] Trying to resolve tenant through '"Cookie"'... 10/03/2026 13.16.32 [Debug] No tenant resolved. 10/03/2026 13.16.32 [Information] Executing endpoint '"Volo.Abp.Identity.IdentityUserLookupController.GetCountAsync (Volo.Abp.Identity.Pro.HttpApi)"' 10/03/2026 13.16.32 [Information] Route matched with "{controller = "UserLookup", area = "identity", action = "GetCount", page = ""}". Executing controller action with signature "System.Threading.Tasks.Task`1[System.Int64] GetCountAsync(Volo.Abp.Identity.UserLookupCountInputDto)" on controller "Volo.Abp.Identity.IdentityUserLookupController" ("Volo.Abp.Identity.Pro.HttpApi"). 10/03/2026 13.16.32 [Information] Authorization failed. "These requirements were not met: PermissionRequirement: AbpIdentity.UserLookup" 10/03/2026 13.16.32 [Warning] ---------- RemoteServiceErrorInfo ---------- { "code": "Volo.Authorization:010001", "message": "Authorization failed! Given policy has not granted.", "details": null, "data": null, "validationErrors": null }

10/03/2026 13.16.32 [Warning] Volo.Abp.Authorization.AbpAuthorizationException: Exception of type 'Volo.Abp.Authorization.AbpAuthorizationException' was thrown. at Microsoft.AspNetCore.Authorization.AbpAuthorizationServiceExtensions.CheckAsync(IAuthorizationService authorizationService, AuthorizationPolicy policy) at Volo.Abp.Authorization.MethodInvocationAuthorizationService.CheckAsync(MethodInvocationAuthorizationContext context) at Volo.Abp.Authorization.AuthorizationInterceptor.AuthorizeAsync(IAbpMethodInvocation invocation) at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, AbpAuditingOptions options, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope) at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at lambda_method4497(Closure, Object) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.

10/03/2026 13.16.32 [Warning] Code:Volo.Authorization:010001 10/03/2026 13.16.32 [Information] AuthenticationScheme: "Bearer" was challenged. 10/03/2026 13.16.32 [Information] Executed action "Volo.Abp.Identity.IdentityUserLookupController.GetCountAsync (Volo.Abp.Identity.Pro.HttpApi)" in 6.1416ms 10/03/2026 13.16.32 [Information] Executed endpoint '"Volo.Abp.Identity.IdentityUserLookupController.GetCountAsync (Volo.Abp.Identity.Pro.HttpApi)"' 10/03/2026 13.16.32 [Information] Request finished "HTTP/2" "GET" "https"://"localhost:44307""""/api/identity/users/lookup/count""" - 401 0 null 31.5577ms

Showing 1 to 1 of 1 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.3.0-preview. Updated on March 11, 2026, 11:45
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.