Starts in:
1 DAY
22 HRS
16 MIN
50 SEC
Starts in:
1 D
22 H
16 M
50 S
Open Closed

Permission-Based Authorization Failing after .Net upgrade 8.0 #8239


User avatar
0
prachi@urvin.finance created
  • ABP Framework version: v8.3.0* UI Type:Blazor Server
  • Database System: EF Core (PostgreSQL)
  • Exception message and full stack trace: 403 Forbidden
  • Steps to reproduce the issue: Log in as an super-admin. Not able to access any identity-related pages such as /identity/organization-units, /identity/roles, etc

I am encountering an application-wide issue where I'm unable to authorize any action method or view based on user permissions. However, role-based authorization is functioning as expected. Upon inspecting the token, it includes the user's role, but ABP is not retrieving permissions associated with that role.

I've also verified the database, and all necessary permissions are correctly seeded to this role. However, ABP still isn't retrieving or recognizing these permissions for authorization, even though role-based checks are working.

I suspect this issue may have arisen due to a recent project upgrade.


50 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    1. Please share a test access_token
    2. Please share the Debug logs of your API call.
    3. Please set a breakpoint to see the current claims of the API call.
    public class Program
    {
        public async static Task<int> Main(string[] args)
        {
            Log.Logger = new LoggerConfiguration()
                .MinimumLevel.Debug()
                .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
                .Enrich.FromLogContext()
                .WriteTo.Async(c => c.File("Logs/logs.txt"))
                .WriteTo.Async(c => c.Console())
                .CreateLogger();
    

    https://abp.io/community/articles/how-claim-type-works-in-asp-net-core-and-abp-framework-km5dw6g1

    Thanks.

  • User Avatar
    0
    prachi@urvin.finance created

    Hi, I would like to open this ticket again.

    I would like to give more context to this.

    I created same endpoint GetPAuthWithPermissions in administration service and identity service. It is running fine in administration service after clearing cache from Redis.

    But the same is not working in Identity service

    Below are the logs

    ---------------------------------------------------Administration service logs -------------------------------------------------------------------------------------------

    [13:06:39 INF] Request starting HTTP/1.1 GET http://localhost:44367/api/permission-service/permission/GetPAuthWithPermission - null null [13:06:42 DBG] PermissionStore.GetCacheItemAsync: pn:U,pk:3a12fe40-5e08-9485-9631-e33430540d9e,n:AbpIdentity.Roles [13:06:42 DBG] Not found in the cache: pn:U,pk:3a12fe40-5e08-9485-9631-e33430540d9e,n:AbpIdentity.Roles [13:06:42 DBG] Getting all granted permissions from the repository for this provider name,key: U,3a12fe40-5e08-9485-9631-e33430540d9e [13:06:42 DBG] Setting the cache items. Count: 185 [13:06:42 DBG] Finished setting the cache items. Count: 185 [13:06:42 DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:AbpIdentity.Roles [13:06:42 DBG] Not found in the cache: pn:R,pk:admin,n:AbpIdentity.Roles [13:06:42 DBG] Getting all granted permissions from the repository for this provider name,key: R,admin [13:06:42 DBG] Setting the cache items. Count: 185 [13:06:42 DBG] Finished setting the cache items. Count: 185 [13:06:42 DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:UrvinFinance_BlazorServer,n:AbpIdentity.Roles [13:06:42 DBG] Not found in the cache: pn:C,pk:UrvinFinance_BlazorServer,n:AbpIdentity.Roles [13:06:42 DBG] Getting all granted permissions from the repository for this provider name,key: C,UrvinFinance_BlazorServer [13:06:42 DBG] Setting the cache items. Count: 185 [13:06:42 DBG] Finished setting the cache items. Count: 185 [13:06:42 INF] Executing endpoint 'UrvinFinance.AdministrationService.Permissions.PermissionController.GetPAuthWithPermission (UrvinFinance.AdministrationService.HttpApi)' [13:06:42 INF] Route matched with {area = "AdministrationService", controller = "Permission", action = "GetPAuthWithPermission", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[System.Boolean] GetPAuthWithPermission() on controller UrvinFinance.AdministrationService.Permissions.PermissionController (UrvinFinance.AdministrationService.HttpApi). [13:06:42 DBG] PermissionStore.GetCacheItemAsync: pn:U,pk:3a12fe40-5e08-9485-9631-e33430540d9e,n:AbpIdentity.Roles [13:06:42 DBG] Found in the cache: pn:U,pk:3a12fe40-5e08-9485-9631-e33430540d9e,n:AbpIdentity.Roles [13:06:42 DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:AbpIdentity.Roles [13:06:42 DBG] Found in the cache: pn:R,pk:admin,n:AbpIdentity.Roles [13:06:42 DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:UrvinFinance_BlazorServer,n:AbpIdentity.Roles [13:06:42 DBG] Found in the cache: pn:C,pk:UrvinFinance_BlazorServer,n:AbpIdentity.Roles [13:06:42 INF] Executing ObjectResult, writing value of type 'System.Boolean'. [13:06:42 INF] Executed action UrvinFinance.AdministrationService.Permissions.PermissionController.GetPAuthWithPermission (UrvinFinance.AdministrationService.HttpApi) in 36.9788ms [13:06:42 INF] Executed endpoint 'UrvinFinance.AdministrationService.Permissions.PermissionController.GetPAuthWithPermission (UrvinFinance.AdministrationService.HttpApi)' [13:06:42 DBG] Added 0 entity changes to the current audit log [13:06:42 DBG] Added 0 entity changes to the current audit log [13:06:42 INF] Request finished HTTP/1.1 GET http://localhost:44367/api/permission-service/permission/GetPAuthWithPermission - 200 null application/json; charset=utf-8 2833.4599ms

    ---------------------------------------------------Identity service logs ------------------------------------------------------------------------------------------- [13:09:03 INF] Request starting HTTP/1.1 GET http://localhost:44388/api/identity-service/user-account/GetPAuthWithPermission - null null [13:09:03 DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:UrvinFinance_BlazorServer,n:AbpIdentity.Roles [13:09:03 DBG] Not found in the cache: pn:C,pk:UrvinFinance_BlazorServer,n:AbpIdentity.Roles [13:09:03 DBG] Getting all granted permissions from the repository for this provider name,key: C,UrvinFinance_BlazorServer [13:09:03 DBG] Setting the cache items. Count: 166 [13:09:03 DBG] Finished setting the cache items. Count: 166 [13:09:03 INF] Authorization failed. These requirements were not met: PermissionRequirement: AbpIdentity.Roles [13:09:03 INF] AuthenticationScheme: Bearer was forbidden. [13:09:03 INF] Request finished HTTP/1.1 GET http://localhost:44388/api/identity-service/user-account/GetPAuthWithPermission - 403 0 null 25.4081ms

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Identity service logs

    1. Please share a test access_token

    2. Please set the log level as Debug and share full logs of Identity service logs

    public class Program
    {
        public async static Task<int> Main(string[] args)
        {
            Log.Logger = new LoggerConfiguration()
                .MinimumLevel.Debug()
                .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
                .Enrich.FromLogContext()
                .WriteTo.Async(c => c.File("Logs/logs.txt"))
                .WriteTo.Async(c => c.Console())
                .CreateLogger();```
    
    1. Please set a breakpoint in Identity service project to see the current claims of the api/identity-service/user-account/GetPAuthWithPermission call.
  • User Avatar
    0
    prachi@urvin.finance created
    1. bearer token: eyJhbGciOiJSUzI1NiIsImtpZCI6IkNBMUNENEZCMjc5RTNGQTkxRjNFM0FBM0VGREM0REEyMEYxNUY1QzhSUzI1NiIsInR5cCI6ImF0K2p3dCIsIng1dCI6InloelUteWVlUDZrZlBqcWo3OXhOb2c4VjljZyJ9.eyJuYmYiOjE3MzE1Njg0NzIsImV4cCI6MTc2MzEwNDQ3MiwiaXNzIjoiaHR0cHM6Ly9hdXRoLXNlcnZlcjo0NDMyMiIsImF1ZCI6WyJBZG1pbmlzdHJhdGlvblNlcnZpY2UiLCJBdXRoU2VydmVyIiwiQ29tbXVuaXR5U2VydmljZSIsIkRhdGFTZXJ2aWNlIiwiR2VuZXJhbFNlcnZpY2UiLCJJZGVudGl0eVNlcnZpY2UiLCJJbWFnZVNlcnZpY2UiLCJJbmRpY2F0b3JTZXJ2aWNlIiwiTmV3c1NlcnZpY2UiLCJOb3RpZmljYXRpb25TZXJ2aWNlIiwiUGF5bWVudFNlcnZpY2UiLCJQcm9kdWN0U2VydmljZSIsIlNhYXNTZXJ2aWNlIiwiU2VhcmNoU2VydmljZSIsIlNlY3VyaXR5U2VydmljZSIsIlNwYWNrVHJhY2tTZXJ2aWNlIl0sImNsaWVudF9pZCI6IlVydmluRmluYW5jZV9CbGF6b3JTZXJ2ZXIiLCJzdWIiOiIzYTEyZmU0MC01ZTA4LTk0ODUtOTYzMS1lMzM0MzA1NDBkOWUiLCJhdXRoX3RpbWUiOjE3MzE1Njg0NzIsImlkcCI6ImxvY2FsIiwiZW1haWwiOiJlbWFpbEBmYWtlLmRvbWFpbiIsInBob25lX251bWJlcl92ZXJpZmllZCI6IkZhbHNlIiwiZW1haWxfdmVyaWZpZWQiOiJUcnVlIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiYWRtaW5Qb3JyYSIsIm5hbWUiOiJhZG1pblBvcnJhIiwiZ2l2ZW5fbmFtZSI6ImFkbWluUG9ycmEiLCJmYW1pbHlfbmFtZSI6IiIsInNlY3VyaXR5LXN0YW1wIjoiTVhUT083SUhVUFA0Nkk0NFVFUEFYUklPT0ZEM1I0REkiLCJyb2xlIjoiYWRtaW4iLCJpYXQiOjE3MzE1Njg0NzIsInNjb3BlIjpbImFkZHJlc3MiLCJBZG1pbmlzdHJhdGlvblNlcnZpY2UiLCJBdXRoU2VydmVyIiwiQ29tbXVuaXR5U2VydmljZSIsIkRhdGFTZXJ2aWNlIiwiZW1haWwiLCJHZW5lcmFsU2VydmljZSIsIklkZW50aXR5U2VydmljZSIsIkltYWdlU2VydmljZSIsIkluZGljYXRvclNlcnZpY2UiLCJOZXdzU2VydmljZSIsIk5vdGlmaWNhdGlvblNlcnZpY2UiLCJvcGVuaWQiLCJQYXltZW50U2VydmljZSIsInBob25lIiwiUHJvZHVjdFNlcnZpY2UiLCJwcm9maWxlIiwicm9sZSIsIlNhYXNTZXJ2aWNlIiwiU2VhcmNoU2VydmljZSIsIlNlY3VyaXR5U2VydmljZSIsIlNwYWNrVHJhY2tTZXJ2aWNlIiwib2ZmbGluZV9hY2Nlc3MiXSwiYW1yIjpbInB3ZCJdfQ.kgSXpQqgJ-fUCsKsSdbZtrmvE\_R\_utayMPYEEKmeA7qseqOkiuFl2tAWaS9MfLhyhox8

    2. a) full logs of Identity service:

    {"Timestamp":"2024-11-14T08:24:28.9368522+00:00","Level":"Information","MessageTemplate":"Request starting {Protocol} {Method} {Scheme}://{Host}{PathBase}{Path}{QueryString} - {ContentType} {ContentLength}","RenderedMessage":"Request starting "HTTP/1.1" "GET" "http"://"localhost:44388""""/api/identity-service/user-account/GetPAuth""" - null null","TraceId":"540079ae59218f99a94716d5dde3b40e","SpanId":"40214419ac8ff144","Properties":{"Protocol":"HTTP/1.1","Method":"GET","ContentType":null,"ContentLength":null,"Scheme":"http","Host":"localhost:44388","PathBase":"","Path":"/api/identity-service/user-account/GetPAuth","QueryString":"","EventId":{"Id":1},"SourceContext":"Microsoft.AspNetCore.Hosting.Diagnostics","RequestId":"0HN84GN10HLUN:00000001","RequestPath":"/api/identity-service/user-account/GetPAuth","ConnectionId":"0HN84GN10HLUN","Application":"UrvinFinance.IdentityService.HttpApi.Host"}}
    {"Timestamp":"2024-11-14T08:24:30.3484416+00:00","Level":"Information","MessageTemplate":"Executing endpoint '{EndpointName}'","RenderedMessage":"Executing endpoint '"UrvinFinance.IdentityService.User.UserAccountController.GetPAuth (UrvinFinance.IdentityService.HttpApi)"'","TraceId":"540079ae59218f99a94716d5dde3b40e","SpanId":"40214419ac8ff144","Properties":{"EndpointName":"UrvinFinance.IdentityService.User.UserAccountController.GetPAuth (UrvinFinance.IdentityService.HttpApi)","EventId":{"Name":"ExecutingEndpoint"},"SourceContext":"Microsoft.AspNetCore.Routing.EndpointMiddleware","RequestId":"0HN84GN10HLUN:00000001","RequestPath":"/api/identity-service/user-account/GetPAuth","ConnectionId":"0HN84GN10HLUN","CorrelationId":"9c3c7dc1bda64215a8927e8612ff9bdc","ClientId":"UrvinFinance\_BlazorServer","Application":"UrvinFinance.IdentityService.HttpApi.Host"}}
    {"Timestamp":"2024-11-14T08:24:30.3806442+00:00","Level":"Information","MessageTemplate":"Route matched with {RouteData}. Executing controller action with signature {MethodInfo} on controller {Controller} ({AssemblyName}).","RenderedMessage":"Route matched with "{area = \\"IdentityService\\", action = \\"GetPAuth\\", controller = \\"UserAccount\\"}". Executing controller action with signature "System.Threading.Tasks.Task`1[System.Boolean] GetPAuth()\" on controller \"UrvinFinance.IdentityService.User.UserAccountController\" (\"UrvinFinance.IdentityService.HttpApi\").","TraceId":"540079ae59218f99a94716d5dde3b40e","SpanId":"40214419ac8ff144","Properties":{"RouteData":"{area = \"IdentityService\", action = \"GetPAuth\", controller = \"UserAccount\"}","MethodInfo":"System.Threading.Tasks.Task`1[System.Boolean] GetPAuth()","Controller":"UrvinFinance.IdentityService.User.UserAccountController","AssemblyName":"UrvinFinance.IdentityService.HttpApi","EventId":{"Id":102,"Name":"ControllerActionExecuting"},"SourceContext":"Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker","ActionId":"bb170843-9eb1-4d97-83e5-b5e8f74b610f","ActionName":"UrvinFinance.IdentityService.User.UserAccountController.GetPAuth (UrvinFinance.IdentityService.HttpApi)","RequestId":"0HN84GN10HLUN:00000001","RequestPath":"/api/identity-service/user-account/GetPAuth","ConnectionId":"0HN84GN10HLUN","CorrelationId":"9c3c7dc1bda64215a8927e8612ff9bdc","ClientId":"UrvinFinance\_BlazorServer","Application":"UrvinFinance.IdentityService.HttpApi.Host"}}
    

    b) full logs of Administration service

    {"Timestamp":"2024-11-14T08:26:55.6814108+00:00","Level":"Information","MessageTemplate":"Request starting {Protocol} {Method} {Scheme}://{Host}{PathBase}{Path}{QueryString} - {ContentType} {ContentLength}","RenderedMessage":"Request starting "HTTP/1.1" "GET" "http"://"localhost:44367""""/api/permission-service/permission/GetPAuth""" - null null","TraceId":"0d356ca8c5b7bbf01ddf802e0d9b6b43","SpanId":"afc92631a2937775","Properties":{"Protocol":"HTTP/1.1","Method":"GET","ContentType":null,"ContentLength":null,"Scheme":"http","Host":"localhost:44367","PathBase":"","Path":"/api/permission-service/permission/GetPAuth","QueryString":"","EventId":{"Id":1},"SourceContext":"Microsoft.AspNetCore.Hosting.Diagnostics","RequestId":"0HN84GOCO2JQL:00000001","RequestPath":"/api/permission-service/permission/GetPAuth","ConnectionId":"0HN84GOCO2JQL","Application":"UrvinFinance.AdministrationService.HttpApi.Host"}}
    {"Timestamp":"2024-11-14T08:26:56.8101460+00:00","Level":"Information","MessageTemplate":"Executing endpoint '{EndpointName}'","RenderedMessage":"Executing endpoint '"UrvinFinance.AdministrationService.Permissions.PermissionController.GetPAuth (UrvinFinance.AdministrationService.HttpApi)"'","TraceId":"0d356ca8c5b7bbf01ddf802e0d9b6b43","SpanId":"afc92631a2937775","Properties":{"EndpointName":"UrvinFinance.AdministrationService.Permissions.PermissionController.GetPAuth (UrvinFinance.AdministrationService.HttpApi)","EventId":{"Name":"ExecutingEndpoint"},"SourceContext":"Microsoft.AspNetCore.Routing.EndpointMiddleware","RequestId":"0HN84GOCO2JQL:00000001","RequestPath":"/api/permission-service/permission/GetPAuth","ConnectionId":"0HN84GOCO2JQL","CorrelationId":"ae3154296cd742c6931a543d9c84df81","ClientId":"UrvinFinance\_BlazorServer","UserId":"3a12fe40-5e08-9485-9631-e33430540d9e","Application":"UrvinFinance.AdministrationService.HttpApi.Host"}}
    {"Timestamp":"2024-11-14T08:26:56.8344923+00:00","Level":"Information","MessageTemplate":"Route matched with {RouteData}. Executing controller action with signature {MethodInfo} on controller {Controller} ({AssemblyName}).","RenderedMessage":"Route matched with "{area = \\"AdministrationService\\", controller = \\"Permission\\", action = \\"GetPAuth\\", page = \\"\\"}". Executing controller action with signature "System.Threading.Tasks.Task`1[System.Boolean] GetPAuth()\" on controller \"UrvinFinance.AdministrationService.Permissions.PermissionController\" (\"UrvinFinance.AdministrationService.HttpApi\").","TraceId":"0d356ca8c5b7bbf01ddf802e0d9b6b43","SpanId":"afc92631a2937775","Properties":{"RouteData":"{area = \"AdministrationService\", controller = \"Permission\", action = \"GetPAuth\", page = \"\"}","MethodInfo":"System.Threading.Tasks.Task`1[System.Boolean] GetPAuth()","Controller":"UrvinFinance.AdministrationService.Permissions.PermissionController","AssemblyName":"UrvinFinance.AdministrationService.HttpApi","EventId":{"Id":102,"Name":"ControllerActionExecuting"},"SourceContext":"Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker","ActionId":"87349f99-8ce5-4ee5-823a-5cdca8724e11","ActionName":"UrvinFinance.AdministrationService.Permissions.PermissionController.GetPAuth (UrvinFinance.AdministrationService.HttpApi)","RequestId":"0HN84GOCO2JQL:00000001","RequestPath":"/api/permission-service/permission/GetPAuth","ConnectionId":"0HN84GOCO2JQL","CorrelationId":"ae3154296cd742c6931a543d9c84df81","ClientId":"UrvinFinance\_BlazorServer","UserId":"3a12fe40-5e08-9485-9631-e33430540d9e","Application":"UrvinFinance.AdministrationService.HttpApi.Host"}}
    
    1. current claims for identity service
    [
    {
    "Type": "nbf",
    "Value": "1731568472"
    },
    {
    "Type": "exp",
    "Value": "1763104472"
    },
    {
    "Type": "iss",
    "Value": "[https://auth-server:44322"](https://auth-server:44322&quot;)
    },
    {
    "Type": "aud",
    "Value": "AdministrationService"
    },
    {
    "Type": "aud",
    "Value": "AuthServer"
    },
    {
    "Type": "client\_id",
    "Value": "UrvinFinance\_BlazorServer"
    },
    {
    "Type": "[http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"](http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier&quot;),
    "Value": "3a12fe40-5e08-9485-9631-e33430540d9e"
    },
    {
    "Type": "auth\_time",
    "Value": "1731568472"
    },
    {
    "Type": "[http://schemas.microsoft.com/identity/claims/identityprovider"](http://schemas.microsoft.com/identity/claims/identityprovider&quot;),
    "Value": "local"
    },
    {
    "Type": "[http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"](http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress&quot;),
    "Value": "[email@fake.domain](mailto:email@fake.domain)"
    },
    {
    "Type": "phone\_number\_verified",
    "Value": "False"
    },
    {
    "Type": "email\_verified",
    "Value": "True"
    },
    {
    "Type": "preferred\_username",
    "Value": "adminPorra"
    },
    {
    "Type": "name",
    "Value": "adminPorra"
    },
    {
    "Type": "[http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname"](http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname&quot;),
    "Value": "adminPorra"
    },
    {
    "Type": "[http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname"](http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname&quot;),
    "Value": ""
    },
    {
    "Type": "security-stamp",
    "Value": "MXTOO7IHUPP46I44UEPAXRIOOFD3R4DI"
    },
    {
    "Type": "[http://schemas.microsoft.com/ws/2008/06/identity/claims/role"](http://schemas.microsoft.com/ws/2008/06/identity/claims/role&quot;),
    "Value": "admin"
    },
    {
    "Type": "iat",
    "Value": "1731568472"
    },
    {
    "Type": "scope",
    "Value": "address"
    },
    
    {
    "Type": "scope",
    "Value": "offline\_access"
    },
    {
    "Type": "[http://schemas.microsoft.com/claims/authnmethodsreferences"](http://schemas.microsoft.com/claims/authnmethodsreferences&quot;),
    "Value": "pwd"
    },
    {
    "Type": "name",
    "Value": "adminPorra"
    }
    ]
    
    1. current claims for administratotion service
    [
     {
     "Type": "nbf",
     "Value": "1731568472"
     },
     {
     "Type": "exp",
     "Value": "1763104472"
     },
     {
     "Type": "iss",
     "Value": "https://auth-server:44322"
     },
     {
     "Type": "aud",
     "Value": "AdministrationService"
     },
     {
     "Type": "client\_id",
     "Value": "UrvinFinance\_BlazorServer"
     },
     {
     "Type": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier",
     "Value": "3a12fe40-5e08-9485-9631-e33430540d9e"
     },
     {
     "Type": "auth\_time",
     "Value": "1731568472"
     },
     {
     "Type": "http://schemas.microsoft.com/identity/claims/identityprovider",
     "Value": "local"
     },
     {
     "Type": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress",
     "Value": "email@fake.domain"
     },
     {
     "Type": "phone\_number\_verified",
     "Value": "False"
     },
     {
     "Type": "email\_verified",
     "Value": "True"
     },
     {
     "Type": "preferred\_username",
     "Value": "adminPorra"
     },
     {
     "Type": "name",
     "Value": "adminPorra"
     },
     {
     "Type": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname",
     "Value": "adminPorra"
     },
     {
     "Type": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname",
     "Value": ""
     },
     {
     "Type": "security-stamp",
     "Value": "MXTOO7IHUPP46I44UEPAXRIOOFD3R4DI"
     },
     {
     "Type": "http://schemas.microsoft.com/ws/2008/06/identity/claims/role",
     "Value": "admin"
     },
     {
     "Type": "iat",
     "Value": "1731568472"
     },
    
     {
     "Type": "scope",
     "Value": "offline\_access"
     },
     {
     "Type": "http://schemas.microsoft.com/claims/authnmethodsreferences",
     "Value": "pwd"
     },
     {
     "Type": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name",
     "Value": "adminPorra"
     }
    ]
    
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The role type in claims is ClaimTypes.Role(http://schemas.microsoft.com/ws/2008/06/identity/claims/role)

    Please check the typeValue of AbpClaimTypes.Role

    var typeValue = AbpClaimTypes.Role typeValue should be http://schemas.microsoft.com/ws/2008/06/identity/claims/role

     {
     "Type": "http://schemas.microsoft.com/ws/2008/06/identity/claims/role",
     "Value": "admin"
     }
    

    If the typeValue is role, that's mean your claim type is incorrect.


    Please also check the Roles of CurrentUser, if the Roles is empty, it is also the problem of claim type.

    Thanks.

  • User Avatar
    0
    prachi@urvin.finance created

    You're right. In IdentityService, AbpClaimTypes.Role = "role" CurrentUser.Roles is empty

    But in AdministrationService, AbpClaimTypes.Role = "http://schemas.microsoft.com/ws/2008/06/identity/claims/role" CurrentUser.Roles has data

    Is there some reference missing which needs to be added in identity service? Kindly help.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please share the content of IdentityService host module. It may be IdentityServiceModule or IdentityServiceHostModule

  • User Avatar
    0
    prachi@urvin.finance created

    Let me know how can we start a private chat?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    liming.ma@volosoft.com

  • User Avatar
    0
    prachi@urvin.finance created

    I have shared the file on google chat. Please check Thanks!

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    No ideas why AbpClaimTypes.Role changed.

    We only change the AbpClaimTypes.Role to role in AbpOpenIddictAspNetCoreModule and some modules.


    Can you search the AbpClaimTypes.Role in your whole solution?

    Or can you share the full source code of your solution?

  • User Avatar
    0
    prachi@urvin.finance created

    I couldn't find anything AbpClaimTypes.Role in the code.

    I can't share the full source code as it's an enterprise application. I can provide the remote access. Thanks

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I can remote-check your app at https://www.worldtimebuddy.com/?qm=1&lid=1816670&h=1816670&date=2024-11-14&sln=10-17&hf=0

    Please send your time to liming.ma@volosoft.com

    I will share the zoom link.

  • User Avatar
    0
    prachi@urvin.finance created

    Could you please confirm if you received my email?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    https://us05web.zoom.us/j/84770432055?pwd=u9f1aiz1EIE2beTZWXVLNpwOaWlz0j.1

  • User Avatar
    0
    prachi@urvin.finance created

    https://www.worldtimebuddy.com/?qm=1&lid=1816670,30&h=1816670&date=2024-11-15&sln=14.5-17&hf=0

    Let me know when to join the zoom link, I'll be available anytime after 14:30 CST today Thanks

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    ok, I will share zoom link at 7:00 AM (UTC+0)

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    maliming is inviting you to a scheduled Zoom meeting.

    Topic: maliming's Zoom Meeting Time: Nov 15, 2024 15:00 Beijing, Shanghai

    Join Zoom Meeting https://us05web.zoom.us/j/82434243267?pwd=utBSiIrsyBIXZbJDJnkfbwZ9MJBhZu.1

    Meeting ID: 824 3424 3267 Passcode: 7Npsyq

  • User Avatar
    0
    prachi@urvin.finance created

    Here are the logs for administration service (When I try to fetch permissions based on roles)

    {"Timestamp":"2024-11-15T07:58:24.1157351+00:00","Level":"Debug","MessageTemplate":"PermissionStore.GetCacheItemAsync: pn:C,pk:UrvinFinance_BlazorServer,n:AbpIdentity.Roles.ManagePermissions","RenderedMessage":"PermissionStore.GetCacheItemAsync: pn:C,pk:UrvinFinance_BlazorServer,n:AbpIdentity.Roles.ManagePermissions","TraceId":"0916ab93ad37a76f6b59a4cfea495dd7","SpanId":"8c4209721689514f","Properties":{"SourceContext":"Volo.Abp.PermissionManagement.PermissionStore","ActionId":"f86db83a-7dfb-4976-a8f3-9f32f3baeae6","ActionName":"Volo.Abp.PermissionManagement.PermissionsController.GetAsync (Volo.Abp.PermissionManagement.HttpApi)","RequestId":"0HN858CUPJDOR:00000001","RequestPath":"/api/permission-management/permissions","ConnectionId":"0HN858CUPJDOR","CorrelationId":"01d645ff206e45b494335dc0cd6b7471","ClientId":"UrvinFinance_BlazorServer","UserId":"3a12fe40-5e08-9485-9631-e33430540d9e","Application":"UrvinFinance.AdministrationService.HttpApi.Host"}}
    {"Timestamp":"2024-11-15T07:58:24.1166152+00:00","Level":"Debug","MessageTemplate":"Found in the cache: pn:C,pk:UrvinFinance_BlazorServer,n:AbpIdentity.Roles.ManagePermissions","RenderedMessage":"Found in the cache: pn:C,pk:UrvinFinance_BlazorServer,n:AbpIdentity.Roles.ManagePermissions","TraceId":"0916ab93ad37a76f6b59a4cfea495dd7","SpanId":"8c4209721689514f","Properties":{"SourceContext":"Volo.Abp.PermissionManagement.PermissionStore","ActionId":"f86db83a-7dfb-4976-a8f3-9f32f3baeae6","ActionName":"Volo.Abp.PermissionManagement.PermissionsController.GetAsync (Volo.Abp.PermissionManagement.HttpApi)","RequestId":"0HN858CUPJDOR:00000001","RequestPath":"/api/permission-management/permissions","ConnectionId":"0HN858CUPJDOR","CorrelationId":"01d645ff206e45b494335dc0cd6b7471","ClientId":"UrvinFinance_BlazorServer","UserId":"3a12fe40-5e08-9485-9631-e33430540d9e","Application":"UrvinFinance.AdministrationService.HttpApi.Host"}}
    {"Timestamp":"2024-11-15T07:58:24.1446857+00:00","Level":"Error","MessageTemplate":"---------- RemoteServiceErrorInfo ----------\n{\n  \"code\": null,\n  \"message\": \"An internal error occurred during your request!\",\n  \"details\": null,\n  \"data\": {\n    \"ActivatorChain\": \"Volo.Abp.PermissionManagement.Identity.RolePermissionManagementProvider -> Volo.Abp.Identity.HttpClientUserRoleFinder\"\n  },\n  \"validationErrors\": null\n}\n","RenderedMessage":"---------- RemoteServiceErrorInfo ----------\n{\n  \"code\": null,\n  \"message\": \"An internal error occurred during your request!\",\n  \"details\": null,\n  \"data\": {\n    \"ActivatorChain\": \"Volo.Abp.PermissionManagement.Identity.RolePermissionManagementProvider -> Volo.Abp.Identity.HttpClientUserRoleFinder\"\n  },\n  \"validationErrors\": null\n}\n","TraceId":"0916ab93ad37a76f6b59a4cfea495dd7","SpanId":"8c4209721689514f","Properties":{"SourceContext":"Volo.Abp.AspNetCore.Mvc.ExceptionHandling.AbpExceptionFilter","ActionId":"f86db83a-7dfb-4976-a8f3-9f32f3baeae6","ActionName":"Volo.Abp.PermissionManagement.PermissionsController.GetAsync (Volo.Abp.PermissionManagement.HttpApi)","RequestId":"0HN858CUPJDOR:00000001","RequestPath":"/api/permission-management/permissions","ConnectionId":"0HN858CUPJDOR","CorrelationId":"01d645ff206e45b494335dc0cd6b7471","ClientId":"UrvinFinance_BlazorServer","UserId":"3a12fe40-5e08-9485-9631-e33430540d9e","Application":"UrvinFinance.AdministrationService.HttpApi.Host"}}
    {"Timestamp":"2024-11-15T07:58:24.1447713+00:00","Level":"Error","MessageTemplate":"An exception was thrown while activating Volo.Abp.PermissionManagement.Identity.RolePermissionManagementProvider -> Volo.Abp.Identity.HttpClientUserRoleFinder.","RenderedMessage":"An exception was thrown while activating Volo.Abp.PermissionManagement.Identity.RolePermissionManagementProvider -> Volo.Abp.Identity.HttpClientUserRoleFinder.","TraceId":"0916ab93ad37a76f6b59a4cfea495dd7","SpanId":"8c4209721689514f","Exception":"Autofac.Core.DependencyResolutionException: An exception was thrown while activating Volo.Abp.PermissionManagement.Identity.RolePermissionManagementProvider -> Volo.Abp.Identity.HttpClientUserRoleFinder.\n ---> Autofac.Core.DependencyResolutionException: None of the constructors found on type 'Volo.Abp.Identity.HttpClientUserRoleFinder' can be invoked with the available services and parameters:\nCannot resolve parameter 'Volo.Abp.Identity.Integration.IIdentityUserIntegrationService userIntegrationService' of constructor 'Void .ctor(Volo.Abp.Identity.IIdentityUserAppService, Volo.Abp.Identity.Integration.IIdentityUserIntegrationService)'.\n\nSee https://autofac.rtfd.io/help/no-constructors-bindable for more info.\n   at Autofac.Core.Activators.Reflection.ReflectionActivator.<>c__DisplayClass14_0.<UseSingleConstructorActivation>b__0(ResolveRequestContext context, Action`1 next)\n   at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action`1 next)\n   at Autofac.Builder.RegistrationBuilder`3.&lt;&gt;c__DisplayClass41_0.&lt;PropertiesAutowired&gt;b__0(ResolveRequestContext context, Action`1 next)\n   at Autofac.Builder.RegistrationBuilder`3.&lt;&gt;c__DisplayClass39_0.&lt;OnActivated&gt;b__0(ResolveRequestContext context, Action`1 next)\n   at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)\n   --- End of inner exception stack trace ---\n   at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)\n   at Autofac.Core.Lifetime.LifetimeScope.CreateSharedInstance(Guid id, Func`1 creator)\n   at Autofac.Core.Lifetime.LifetimeScope.CreateSharedInstance(Guid primaryId, Nullable`1 qualifyingId, Func`1 creator)\n   at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action`1 next)\n   at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action`1 next)\n   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest& request)\n   at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest& request)\n   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)\n   at Volo.Abp.PermissionManagement.PermissionManager.&lt;&gt;c__DisplayClass24_0.&lt;.ctor&gt;b__1(Type c)\n   at System.Linq.Enumerable.SelectIListIterator`2.Fill(IList`1 source, Span`1 results, Func`2 func)\n   at System.Linq.Enumerable.SelectIListIterator`2.ToList()\n   at Volo.Abp.PermissionManagement.PermissionManager.<>c__DisplayClass24_0.<.ctor>b__0()\n   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)\n--- End of stack trace from previous location ---\n   at System.Lazy`1.CreateValue()\n   at Volo.Abp.PermissionManagement.PermissionManager.get_ManagementProviders()\n   at Volo.Abp.PermissionManagement.PermissionManager.GetInternalAsync(PermissionDefinition[] permissions, String providerName, String providerKey)\n   at Volo.Abp.PermissionManagement.PermissionManager.GetAsync(String[] permissionNames, String providerName, String providerKey)\n   at Volo.Abp.PermissionManagement.PermissionAppService.GetAsync(String providerName, String providerKey)\n   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)\n   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()\n   at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)\n   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)\n   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)\n   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()\n   at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)\n   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)\n   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)\n   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()\n   at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, AbpAuditingOptions options, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope)\n   at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation)\n   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)\n   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)\n   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()\n   at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)\n   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)\n   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)\n   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()\n   at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)\n   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)\n   at lambda_method3061(Closure, Object)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.&lt;InvokeActionMethodAsync&gt;g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)","Properties":{"SourceContext":"Volo.Abp.AspNetCore.Mvc.ExceptionHandling.AbpExceptionFilter","ActionId":"f86db83a-7dfb-4976-a8f3-9f32f3baeae6","ActionName":"Volo.Abp.PermissionManagement.PermissionsController.GetAsync (Volo.Abp.PermissionManagement.HttpApi)","RequestId":"0HN858CUPJDOR:00000001","RequestPath":"/api/permission-management/permissions","ConnectionId":"0HN858CUPJDOR","CorrelationId":"01d645ff206e45b494335dc0cd6b7471","ClientId":"UrvinFinance_BlazorServer","UserId":"3a12fe40-5e08-9485-9631-e33430540d9e","Application":"UrvinFinance.AdministrationService.HttpApi.Host"}}
    {"Timestamp":"2024-11-15T07:58:24.1447932+00:00","Level":"Error","MessageTemplate":"---------- Exception Data ----------\nActivatorChain = Volo.Abp.PermissionManagement.Identity.RolePermissionManagementProvider -> Volo.Abp.Identity.HttpClientUserRoleFinder\n","RenderedMessage":"---------- Exception Data ----------\nActivatorChain = Volo.Abp.PermissionManagement.Identity.RolePermissionManagementProvider -> Volo.Abp.Identity.HttpClientUserRoleFinder\n","TraceId":"0916ab93ad37a76f6b59a4cfea495dd7","SpanId":"8c4209721689514f","Properties":{"SourceContext":"Volo.Abp.AspNetCore.Mvc.ExceptionHandling.AbpExceptionFilter","ActionId":"f86db83a-7dfb-4976-a8f3-9f32f3baeae6","ActionName":"Volo.Abp.PermissionManagement.PermissionsController.GetAsync (Volo.Abp.PermissionManagement.HttpApi)","RequestId":"0HN858CUPJDOR:00000001","RequestPath":"/api/permission-management/permissions","ConnectionId":"0HN858CUPJDOR","CorrelationId":"01d645ff206e45b494335dc0cd6b7471","ClientId":"UrvinFinance_BlazorServer","UserId":"3a12fe40-5e08-9485-9631-e33430540d9e","Application":"UrvinFinance.AdministrationService.HttpApi.Host"}}
    {"Timestamp":"2024-11-15T07:58:24.1449158+00:00","Level":"Information","MessageTemplate":"Executing {ObjectResultType}, writing value of type '{Type}'.","RenderedMessage":"Executing \"ObjectResult\", writing value of type '\"Volo.Abp.Http.RemoteServiceErrorResponse\"'.","TraceId":"0916ab93ad37a76f6b59a4cfea495dd7","SpanId":"8c4209721689514f","Properties":{"ObjectResultType":"ObjectResult","Type":"Volo.Abp.Http.RemoteServiceErrorResponse","EventId":{"Id":1,"Name":"ObjectResultExecuting"},"SourceContext":"Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor","ActionId":"f86db83a-7dfb-4976-a8f3-9f32f3baeae6","ActionName":"Volo.Abp.PermissionManagement.PermissionsController.GetAsync (Volo.Abp.PermissionManagement.HttpApi)","RequestId":"0HN858CUPJDOR:00000001","RequestPath":"/api/permission-management/permissions","ConnectionId":"0HN858CUPJDOR","CorrelationId":"01d645ff206e45b494335dc0cd6b7471","ClientId":"UrvinFinance_BlazorServer","UserId":"3a12fe40-5e08-9485-9631-e33430540d9e","Application":"UrvinFinance.AdministrationService.HttpApi.Host"}}
    {"Timestamp":"2024-11-15T07:58:24.1451345+00:00","Level":"Information","MessageTemplate":"Executed action {ActionName} in {ElapsedMilliseconds}ms","RenderedMessage":"Executed action \"Volo.Abp.PermissionManagement.PermissionsController.GetAsync (Volo.Abp.PermissionManagement.HttpApi)\" in 35.6978ms","TraceId":"0916ab93ad37a76f6b59a4cfea495dd7","SpanId":"8c4209721689514f","Properties":{"ActionName":"Volo.Abp.PermissionManagement.PermissionsController.GetAsync (Volo.Abp.PermissionManagement.HttpApi)","ElapsedMilliseconds":35.6978,"EventId":{"Id":105,"Name":"ActionExecuted"},"SourceContext":"Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker","RequestId":"0HN858CUPJDOR:00000001","RequestPath":"/api/permission-management/permissions","ConnectionId":"0HN858CUPJDOR","CorrelationId":"01d645ff206e45b494335dc0cd6b7471","ClientId":"UrvinFinance_BlazorServer","UserId":"3a12fe40-5e08-9485-9631-e33430540d9e","Application":"UrvinFinance.AdministrationService.HttpApi.Host"}}
    {"Timestamp":"2024-11-15T07:58:24.1451577+00:00","Level":"Information","MessageTemplate":"Executed endpoint '{EndpointName}'","RenderedMessage":"Executed endpoint '\"Volo.Abp.PermissionManagement.PermissionsController.GetAsync (Volo.Abp.PermissionManagement.HttpApi)\"'","TraceId":"0916ab93ad37a76f6b59a4cfea495dd7","SpanId":"8c4209721689514f","Properties":{"EndpointName":"Volo.Abp.PermissionManagement.PermissionsController.GetAsync (Volo.Abp.PermissionManagement.HttpApi)","EventId":{"Id":1,"Name":"ExecutedEndpoint"},"SourceContext":"Microsoft.AspNetCore.Routing.EndpointMiddleware","RequestId":"0HN858CUPJDOR:00000001","RequestPath":"/api/permission-management/permissions","ConnectionId":"0HN858CUPJDOR","CorrelationId":"01d645ff206e45b494335dc0cd6b7471","ClientId":"UrvinFinance_BlazorServer","UserId":"3a12fe40-5e08-9485-9631-e33430540d9e","Application":"UrvinFinance.AdministrationService.HttpApi.Host"}}
    
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    
    Autofac.Core.DependencyResolutionException: 
    An exception was thrown while activating 
    
    Volo.Abp.PermissionManagement.Identity.RolePermissionManagementProvider -> Volo.Abp.Identity.HttpClientUserRoleFinder.
    
    ---> Autofac.Core.DependencyResolutionException: None of the constructors found on type 'Volo.Abp.Identity.HttpClientUserRoleFinder' can be invoked with the available services and parameters:
    
    Cannot resolve parameter 'Volo.Abp.Identity.Integration.IIdentityUserIntegrationService userIntegrationService' 
    
    of constructor 'Void .ctor(Volo.Abp.Identity.IIdentityUserAppService, Volo.Abp.Identity.Integration.IIdentityUserIntegrationService)'.
    

    To use IIdentityUserIntegrationService, you have to depend on AbpIdentityApplicationModule

  • User Avatar
    0
    prachi@urvin.finance created

    I added it in IdentityServiceHttpApiHostModule but still the same error

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you get the full Logs.txt file of your IdentityServiceHttpApiHostModule? then send it to liming.ma@volosoft.com

    Thanks.

  • User Avatar
    0
    prachi@urvin.finance created

    When fetching permissions for a role from the UI, no logs appear in the Identity Service, but logs are recorded in the Administration Service for the same request.

    Here are the full logs:

    [10:10:27 INF] Request starting HTTP/1.1 GET http://administration-service:44367/api/permission-management/permissions?providerName=R&providerKey=admin&api-version=1.0 - null null [10:10:27 INF] Executing endpoint 'Volo.Abp.PermissionManagement.PermissionsController.GetAsync (Volo.Abp.PermissionManagement.HttpApi)' [10:10:27 INF] Route matched with {area = "permissionManagement", action = "Get", controller = "Permissions", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.PermissionManagement.GetPermissionListResultDto] GetAsync(System.String, System.String) on controller Volo.Abp.PermissionManagement.PermissionsController (Volo.Abp.PermissionManagement.HttpApi). [10:10:27 DBG] PermissionStore.GetCacheItemAsync: pn:U,pk:3a12fe40-5e08-9485-9631-e33430540d9e,n:AbpIdentity.Roles.ManagePermissions [10:10:27 DBG] Found in the cache: pn:U,pk:3a12fe40-5e08-9485-9631-e33430540d9e,n:AbpIdentity.Roles.ManagePermissions [10:10:27 DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:AbpIdentity.Roles.ManagePermissions [10:10:27 DBG] Found in the cache: pn:R,pk:admin,n:AbpIdentity.Roles.ManagePermissions [10:10:27 DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:UrvinFinance_BlazorServer,n:AbpIdentity.Roles.ManagePermissions [10:10:27 DBG] Found in the cache: pn:C,pk:UrvinFinance_BlazorServer,n:AbpIdentity.Roles.ManagePermissions [10:10:27 ERR] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": { "ActivatorChain": "Volo.Abp.PermissionManagement.Identity.RolePermissionManagementProvider -> Volo.Abp.Identity.HttpClientUserRoleFinder" }, "validationErrors": null }

    [10:10:27 ERR] An exception was thrown while activating Volo.Abp.PermissionManagement.Identity.RolePermissionManagementProvider -> Volo.Abp.Identity.HttpClientUserRoleFinder. Autofac.Core.DependencyResolutionException: An exception was thrown while activating Volo.Abp.PermissionManagement.Identity.RolePermissionManagementProvider -> Volo.Abp.Identity.HttpClientUserRoleFinder. ---> Autofac.Core.DependencyResolutionException: None of the constructors found on type 'Volo.Abp.Identity.HttpClientUserRoleFinder' can be invoked with the available services and parameters: Cannot resolve parameter 'Volo.Abp.Identity.Integration.IIdentityUserIntegrationService userIntegrationService' of constructor 'Void .ctor(Volo.Abp.Identity.IIdentityUserAppService, Volo.Abp.Identity.Integration.IIdentityUserIntegrationService)'.

    See https://autofac.rtfd.io/help/no-constructors-bindable for more info. at Autofac.Core.Activators.Reflection.ReflectionActivator.<>c__DisplayClass14_0.

    [10:10:27 INF] Executing ObjectResult, writing value of type 'Volo.Abp.Http.RemoteServiceErrorResponse'. [10:10:27 INF] Executed action Volo.Abp.PermissionManagement.PermissionsController.GetAsync (Volo.Abp.PermissionManagement.HttpApi) in 31.564ms [10:10:27 INF] Executed endpoint 'Volo.Abp.PermissionManagement.PermissionsController.GetAsync (Volo.Abp.PermissionManagement.HttpApi)' [10:10:27 DBG] Added 0 entity changes to the current audit log [10:10:27 DBG] Added 0 entity changes to the current audit log [10:10:27 INF] Request finished HTTP/1.1 GET http://administration-service:44367/api/permission-management/permissions?providerName=R&providerKey=admin&api-version=1.0 - 500 null application/json; charset=utf-8 45.1891ms

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Have you depended on AbpIdentityHttpApiClientModule in your administration-service?

    You shouldn't depend on AbpIdentityHttpApiClientModule.

    Please share the full logs.txt file. liming.ma@volosoft.com

    You can delete the logs.txt file. Then start administration-service again, reproduce the problem and share the logs.txt.

    Thanks.

  • User Avatar
    0
    prachi@urvin.finance created

    No that's not the case. Only IdentityServiceHttpApiClientModule depends on AbpIdentityHttpApiClientModule.

    I have e-mailed you the log file. You can have a look.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06