Activities of "EngincanV"

Hi, it seems in your App.razor file (under Components folder), you should set base as follows (update the related base tag's href):

<base href="/Session/Onboarding/" /> 

The <base> HTML element specifies the base URL to use for all relative URLs in a document. There can be only one <base> element in a document. Ref: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base

Thanks for the answer! We are aiming to enable Microsoft Entra Id SSO login for some of our customers, that use our (Abp) application. How is that going to work when we cannot configure the azure tenant in the tenant's external login provider configuration? If only the client id and the secret are configurable, how can the customer point the configuration to their Microsoft Entra Id?

You're right to point out that simply configuring Client ID and Secret might not be enough for Microsoft Entra ID (now known as Microsoft Entra ID, formerly Azure AD) in a multi-tenant scenario. Each customer using their own Microsoft Entra ID will indeed have a unique Tenant ID (also known as Directory ID) that your application needs to target for authentication.

For that purpose, you should implement dynamic configuration using ICoonfigureOptions<>. Here is what you can do:

  1. Implement IConfigureOptions<OpenIdConnectOptions> for Azure AD:

Since Microsoft Entra ID uses the OpenID Connect protocol, you'll need to implement IConfigureOptions<OpenIdConnectOptions>.

public class AzureAdTenantOptionsProvider : IConfigureOptions<OpenIdConnectOptions>, ITransientDependency
{
    private readonly ICurrentTenant _currentTenant;
    private readonly ITenantAzureAdSettingsService _tenantAzureAdSettingsService; //NOTE: you need to implement this service

    public AzureAdTenantOptionsProvider(ICurrentTenant currentTenant, ITenantAzureAdSettingsService tenantAzureAdSettingsService)
    {
        _currentTenant = currentTenant;
        _tenantAzureAdSettingsService = tenantAzureAdSettingsService;
    }

    public void Configure(OpenIdConnectOptions options)
    {
        if (_currentTenant.Id.HasValue)
        {
            var tenantId = _currentTenant.Id.Value;
            var azureAdSettings = _tenantAzureAdSettingsService.GetAzureAdSettings(tenantId); // Implement this

            if (azureAdSettings != null && azureAdSettings.IsEnabled)
            {
                options.ClientId = azureAdSettings.ClientId;
                options.ClientSecret = azureAdSettings.ClientSecret;
                options.Authority = $"https://login.microsoftonline.com/{azureAdSettings.TenantId}/v2.0";
                options.ResponseType = "code"; // Or your preferred response type
                options.SaveTokens = true;
                options.GetClaimsFromUserInfoEndpoint = true;
                // Add other necessary options as per your requirements
            }
            else
            {
                // Or configure default behavior
            }
        }
        else
        {
            // Configure default Azure AD settings for the host if needed
        }
    }
}
  1. Register the option dynamically in your module class (inside ConfigureServices method):
services.ConfigureOptions<AzureAdTenantOptionsProvider>();

Note that, this requires additional implementation on your side and in the above example, I have just tried to provide you an approach. Since this is not fully related to ABP, you may need to check additional articles on the web.


In summary, to enable Microsoft Entra ID SSO login for different tenants:

  • You need to implement a dynamic option as I have described above, then create a service that returns tenantId from each customer for their Azure AD.
  • Our current system, only allows single-tenant configuration for EntraID, but by providing dynamic options, you can implement according to your business.

Regards.

Hi, I'm unable to reproduce your problem. Tried applying each step you provided but could not reproduce it. Your problems seem to be related to that you have not built your solution.

Please get a graphBuild on your solution (dotnet build /graphbuild) and see if really there is any build error. If still there are build errors, share your solution via email (to support@abp.io with ticket number), so I can check your solution. Since, could not produce the problem with the specified steps, I'm unable to help you at that point and waiting for your confirmation.

Regards.

Answer

Hi, yes you can generate CRUD pages via ABP CLI, please refer to the Generating CRUD Pages via Command Line section in the ABP Suite documentation.

Let me know, if you need further info. Regards.

I saw that reference but it assumes a json metadata file was generated via the Suite tool initially. If one is to manually replicate this, what are the minimum required properties?

You can use the following json template as an example:

Promotion.json (entity name: "Promotion", and only has a single property named "Title")

{
  "Id": "1148f4fe-8dfd-4435-8953-99db98b0c82a",
  "Name": "Promotion",
  "OriginalName": "Promotion",
  "NamePlural": "Promotions",
  "DatabaseTableName": "Promotions",
  "Namespace": "Promotions",
  "Type": 1,
  "MasterEntityName": null,
  "MasterEntity": null,
  "BaseClass": "FullAuditedAggregateRoot",
  "PageTitle": "Promotions",
  "MenuIcon": "file-alt",
  "PrimaryKeyType": "Guid",
  "PreserveCustomCode": true,
  "IsMultiTenant": false,
  "CheckConcurrency": true,
  "BulkDeleteEnabled": true,
  "ShouldCreateUserInterface": true,
  "ShouldCreateBackend": true,
  "ShouldExportExcel": true,
  "ShouldAddMigration": true,
  "ShouldUpdateDatabase": true,
  "CreateTests": true,
  "Properties": [
    {
      "Id": "e7c6fe43-3e99-495c-bde8-ecbbcd6793e3",
      "Name": "Title",
      "Type": "string",
      "EnumType": "",
      "EnumNamespace": "",
      "EnumAngularImport": "shared/enums",
      "EnumFilePath": null,
      "DefaultValue": null,
      "IsNullable": false,
      "IsRequired": false,
      "IsFilterable": true,
      "AllowEmptyStrings": false,
      "IsTextArea": false,
      "MinLength": null,
      "MaxLength": null,
      "SortOrder": 0,
      "SortType": 0,
      "Regex": "",
      "EmailValidation": false,
      "ShowOnList": true,
      "ShowOnCreateModal": true,
      "ShowOnEditModal": true,
      "ReadonlyOnEditModal": false,
      "EnumValues": null,
      "IsSelected": true,
      "MaxFileSize": null,
      "OrdinalIndex": 0
    }
  ],
  "NavigationProperties": [],
  "NavigationConnections": [],
  "ChildEntities": [],
  "PhysicalFileName": "Promotion.json"
}

I have re-generated openiddict.pfx and made some adjustments according to the documentation, but the original problem still occurs. I would like to remind you that: a. It was able to run normally in v9.0.4; the problem occurred after upgrading to v9.1.0. b. The error event mentioned occurred during module Volo.Abp.OpenIddict.AbpOpenIddictDomainModule (Volo.Abp.OpenIddict.Domain, Version=9.0.4.0); but I searched the entire project code and could not find any content related to using Volo.Abp.OpenIddict.Domain !

Hi, thanks for the detailed information. The HTTP Error 500.30 and the subsequent System.MissingMethodException clearly indicate an issue with the OpenIddict library after the upgrade from 9.0.4 to 9.1.0.

The error message "Method not found: 'System.Collections.Generic.IAsyncEnumerable`1<System.Object> OpenIddict.Abstractions.IOpenIddictAuthorizationManager.FindAsync(System.String, System.String, System.Threading.CancellationToken)'" suggests that the Volo.Abp.OpenIddict.Domain module (version 9.0.4) is looking for a method in the OpenIddict.Abstractions library that is either no longer present or has a different signature in the version that is now being used (likely the one compatible with ABP 9.1.0).

There might be several reasons for these problems:

  • Ensure there are no inconsistent versions: (The most common cause for such errors after an upgrade is having inconsistent versions of ABP related NuGet packages in your solution. Please ensure that all ABP packages in all of your projects (including your Blazor project, Domain project, Application project, etc.) are updated to version 9.1.0.)
  • Clean and Rebuild Your Solution after the upgrade: So the old .dlls can be deleted and the method missing error being fixed.

Ok I will try to do it on an empty template I couldn’t find the time yet can you give little bit more time and keep this open.

Sure, I'll reopen the question if our support bot closes it automatically. I'll keep the question open.

Hi, after you have configured external providers for the host side:

Then, you can see the "external provider" tab in the settings -> account section for the tenant (you may need to login as the admin user of the related tenant):

As you can see from the figure above, "amazon" is the tenant name and the "admin" is the username of the tenant admin, and it's possible to configure the client-id and client-secret for the related external provider.

  • You can use the host settings by checking the Use host settings checkbox,
  • Or override the client-id and client-secret per tenant
Answer

Hi, yes you can generate CRUD pages via ABP CLI, please refer to the Generating CRUD Pages via Command Line section in the ABP Suite documentation.

Let me know, if you need further info. Regards.

Hi, EngincanV I can not understand your answers... I will try ask different way. I am using only ABP Suite to make all Entities. I never write any code as all parts are generated automatically, and I can create all needed Entities with properties using ABP Suite only. I am not dealing with Visual Studio as it was not part of my duties :)

As I mentioned I did Step 6 in ABP Suite. I created new Entity with properties. And then I want to run dotnet ef database update to have tables in database, but I have no migration file generated. So I can not create tables. So please provide steps I must do after my Step 6.

Hi, sorry for the inconvenience. I will explain in detail:

  • After you imported the [FirstModule] into the main application [DemoSolution] and generated the CRUD pages for [FirstModule], as you said it does not create a new migration.
  • At that point, you can build the [DemoSolution] (/graphBuild) and then create a new migration via ABP Studio or dotnet-ef global tool like in the following figure:

Right click to the [DemoSln.EntityFrameworkCore] project, then select Ef Core CLI -> Add migration. It will open a dialog as below:

Write a migration name and then click the OK button to create a migration.

  • After creating the migration, you can check from the Migrations folder under your [DemoSln.EntityFrameworkCore] project and see the generated migration:

  • Then, you can update your database by either using the dotnet ef database update command in the [DemoSln.EntityFrameworkCore] project or via ABP Studio:

  • Then, in your database, you should see the table:


I hope I was able to explain it in detail. If there is a step that is unclear, feel free to ask. Regards.

protected override void HandlePropertiesBeforeSave()
{
var entries = ChangeTracker.Entries().ToList();
foreach (var entry in entries)
{
HandleExtraPropertiesOnSave(entry);

        if (entry.State.IsIn(EntityState.Modified, EntityState.Deleted))  
        {  
            UpdateConcurrencyStamp(entry);  
        }  
    }  

    foreach (var entry in AbpEfCoreNavigationHelper.GetChangedEntityEntries().Where(x => x.State == EntityState.Unchanged))  
    {  
        UpdateConcurrencyStamp(entry);  
    }  
}  

Hi, as it is override in dbcontext class, can you please confirm if it can impact the performance?

Hi, it should not impact performance. In our current version, this code is already implemented in the AbpDbContext implementation (I mean in v9.0+).

Regards.

Showing 331 to 340 of 1355 entries
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