Open Closed

Unable to update Permissions for new Microservice #9649


User avatar
0
rogercprops created

Solution Configuration

  • Template: microservice
  • Created ABP Studio Version: 1.0.2
  • Current ABP Studio Version: 1.1.0
  • 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

This just started happening, perhaps with my upgrade to Abp Studio Version 1.1.1.

If I create a new Microservice module in our existing solution created with the Micorservice Template, then use Abp Suite to generate the CRUD entities it isn't automatically seeding the permission grants database for the 'admin' role like it has in the past.

It is adding the permission group and permissions though.

Also, in the MVC web UI, the new permission group and permissions aren't showing so they can't be assigned to the manually.

Steps to reproduce:

Add a new Microservice module to an existing Microservice solution. Add a new entity and properties using Abp Suite. Generate the solution updates and migrations. Run the new microservice service on localhost Run a sql query to get the permission group, permissions and permission grants from the Administration database SELECT * FROM [CloverleafCMS__ST_Administration].[dbo].[AbpPermissionGroups] WHERE [DisplayName] LIKE '%TestS%' ORDER BY [Name]

SELECT * FROM [CloverleafCMS__ST_Administration].[dbo].[AbpPermissions] WHERE [Name] LIKE '%Items%' ORDER BY [GroupName], [Name]

SELECT * FROM [CloverleafCMS__ST_Administration].[dbo].[AbpPermissionGrants] -- WHERE [TenantId] IS NOT NULL -- AND [ProviderKey] != 'admin' WHERE [Name] LIKE '%.Items%' ORDER BY [TenantId], [ProviderKey], [Name]

However when I log in as admin in the host tenant the new permission group isn't available for assigning to a role.

I cleared my browser cache and it's still not showing.


3 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent

    When you add a new microservice and generate entities with ABP Suite, the permissions are registered in the database, but if the new permission group does not appear in the web UI for role assignment, it is usually due to one of the following reasons in a microservice solution:

    1. Application Contracts Reference Missing:
      The new microservice's Application.Contracts project must be referenced by the IdentityService (or the service responsible for permission management). This is required so that the permissions are registered and exposed to the permission management UI. If the reference is missing, the permission definitions will not be loaded into the permission management system.

    2. Rebuild and Restart All Services:
      After adding a new microservice and updating references, you must rebuild the entire solution and restart all related services (especially the IdentityService and AdministrationService). This ensures that the new permissions are discovered and loaded.

    3. Permission Provider Registration:
      Ensure that your new microservice's PermissionDefinitionProvider is properly implemented and included in the Application.Contracts project. The provider should define the permission group and permissions.

    4. Database Migration:
      Make sure you have applied the latest database migrations for the new microservice and the Administration database.

    5. Cache Issues:
      Clear the distributed cache (e.g., Redis) after making changes to permissions, as permission definitions are cached.

    Checklist to resolve:

    • Add a project reference from IdentityService.Application.Contracts to your new microservice's Application.Contracts.
    • Rebuild the solution and restart all services.
    • Clear the distributed cache.
    • Verify that your PermissionDefinitionProvider is present and correct.

    This approach aligns with common ABP microservice conventions for permission management.

    No verified source available for this specific query.


    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

  • User Avatar
    0
    rogercprops created

    Thanks.

    It was the Redis cache. Once I cleared it, I was able to edit them.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    👍

Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 12, 2025, 10:20