Check the docs before asking a question: https://abp.io/docs/latest Check the samples to see the basic tasks: https://abp.io/docs/latest/samples The exact solution to your question may have been answered before, and please first use the search on the homepage.
Provide us with the following info:
🧐 Hint: If you are using the ABP Studio, you can see all the information about your solution from the configuration window, which opens when you right-click on the solution and click on the Solution Configuration
button.
- Template: microservice
- Created ABP Studio Version: 1.0.1
- Current ABP Studio Version: 1.0.1
- Multi-Tenancy: Yes
- UI Framework: mvc
- Theme: leptonx
- Theme Style: system
- Theme Menu Placement: side
- Run Install Libs: Yes
- Database Provider: ef
- Database Management System: sqlserver
- Mobile Framework: none
- Public Website: No
- Social Login: Yes
- Include Tests: Yes
- Dynamic Localization: Yes
- Kubernetes Configuration: Yes
- Grafana Dashboard: Yes
- Use Local References: No
- Optional Modules:
- GDPR
- TextTemplateManagement
- AuditLogging
- OpenIddictAdmin
- Selected Languages: English, English (United Kingdom), Español
- Default Language: English
- Create Command: abp new CloverleafCMS -t microservice --ui-framework mvc --database-provider ef --database-management-system sqlserver --theme leptonx --skip-migrator --without-cms-kit --dont-run-bundling -no-file-management -no-language-management
6/23/2025 8:23:51 PM [Information] "Bearer" was not authenticated. Failure message: "IDX10511: Signature validation failed. Keys tried: 'Microsoft.IdentityModel.Tokens.X509SecurityKey, KeyId: '4C44506B63683FAFB81F426A6A1225833F2BE6A8', InternalId: 'TERQa2NoP6-4H0JqahIlgz8r5qg'. , KeyId: 4C44506B63683FAFB81F426A6A1225833F2BE6A8 '. Number of keys in TokenValidationParameters: '0'. Number of keys in Configuration: '2'. Matched key was in 'Configuration'. kid: '4C44506B63683FAFB81F426A6A1225833F2BE6A8'. Exceptions caught: 'PII of type 'System.Text.StringBuilder' is hidden. For more details, see [https://aka.ms/IdentityModel/PII.]'. token: 'PII of type 'Microsoft.IdentityModel.JsonWebTokens.JsonWebToken' is hidden. For more details, see [https://aka.ms/IdentityModel/PII.]'. See https://aka.ms/IDX10511 for details." 6/23/2025 8:23:51 PM [Information] Authorization failed. "These requirements were not met: PermissionRequirement: ActionItemService.ActionItems" 6/23/2025 8:23:51 PM [Information] AuthenticationScheme: "Bearer" was challenged. 6/23/2025 8:23:51 PM [Information] Request finished "HTTP/1.1" "GET" "http"://"localhost:44379""""/api/actionitem/action-items""?clientId=10BECE0B-086C-F92C-A6D1-3A1AB084E5A2" - 401 0 null 3.5956ms
- Steps to reproduce the issue:
- using v9.2 and Abp Studio create a microservice solution.
- add a business microservice and a Token microservice to get an abp token for calling the business microservice. Ours are ActionItemService and TokenService.
- using the MVC web app add a client called 'CloverleafApi' or anyname you like or add the following to
- OpenIddictDataSeeder.cs - add the application -
- //Cloverleaf API Client await CreateOrUpdateApplicationAsync( applicationType: OpenIddictConstants.ApplicationTypes.Web, name: "CloverleafAPI", type: OpenIddictConstants.ClientTypes.Confidential, consentType: OpenIddictConstants.ConsentTypes.Implicit, displayName: "Cloverleaf API Client", secret: "XXXXx", // replace with your secret grantTypes: new List //Hybrid flow { OpenIddictConstants.GrantTypes.ClientCredentials, OpenIddictConstants.GrantTypes.Password, OpenIddictConstants.GrantTypes.RefreshToken }, scopes: commonScopes.Union(new[] { "ActionItemService", "AdministrationService", "AuditLoggingService", "AuthServer", "GdprService", "IdentityService", "LanguageService", "SaasService", "TokenService", }).ToList(), redirectUris: null, postLogoutRedirectUris: null, clientUri: null, logoUri: null );
- OpenIddictDataSeeder.cs - add the application -
Once solution is running in AbpStudio then go to Postman and get a token via the TokenService using the host admin id and password.
Create an ActionItem.
Update and ActionItem.
Get the ActionItem.
I can successfully create and update an ActionItem with the host admin credentials but I get the above 401 not authorized when calling the GET endpoint.
5 Answer(s)
-
0
hi
Can you share your test project?
liming.ma@volosoft.com
Thanks.
-
0
Project shared... GitHub invite sent.
-
0
hi
I can successfully create and update an ActionItem with the host admin credentials but I get the above 401 not authorized when calling the GET endpoint.
There must be an error with the token passed using the GET method. Your token is fine.
go to Postman and get a token via the TokenService using the host admin id and password. Create an ActionItem. Update and ActionItem. Get the ActionItem.
Can you share these request information (POSTMAN) details?
eg:
Thanks.
-
0
-
0
: )