Open Closed

How to set extended property of saas tenants, while creating a new tenant #7153


User avatar
0
Sergei.Gorlovetsky created

Hello,

I have used this method (https://docs.abp.io/en/abp/latest/Object-Extensions#object-extension-manager) to extend Saas.Tenants

I have BlobConnectionString as new column in Saas.Tenants Table. I am wondering, how can I add that extra property in the API call while creating a new tenant ?

I tried to add that under extraproperties in the JSON body, but that did not help.

End point : /api/saas/tenants

{
    "extraProperties": {
        "blobConnectionString" : "abc"
    },
    "name": "tenant7",
    "editionId": null,
    "adminEmailAddress": "tenant3@mellowoodmedical.com",
    "adminPassword": "Test@123",
    "activationState": 0,
    "activationEndDate": "",
    "connectionStrings": {
        "id": "",
        "default": null,
        "databases": []
    }
}
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

1 Answer(s)
  • User Avatar
    1
    liangshiwei created
    Fullstack Developer

    Hi,

    First, you need to configure the module entity extension.

    https://docs.abp.io/en/abp/latest/Module-Entity-Extensions#quick-example

    For example:

    public static void ConfigureExtraProperties()
    {
        OneTimeRunner.Run(() =>
        {
            ObjectExtensionManager.Instance.Modules()
                .ConfigureSaas(saas =>
                {
                    saas.ConfigureTenant(tenant =>
                    {
                        user.AddOrUpdateProperty<string>( //property type: string
                            "BlobConnectionString", //property name
                            property =>
                            {
                                //...other configurations for this property
                            }
                        );
                    });
                });
        });
    }
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
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.8.0-preview. Updated on September 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.