-->

How to delete tenants in WSO2 Identity Server?

2019-05-06 22:32发布

问题:

In v 4.6.0, we cannot delete tenats through the UI, only disable. However, I see there is a deleteTenant method on the TenantMgtAdminService soap service.

I have tried to call this service, but I get an error. From the logs, it has:

{org.wso2.carbon.tenant.mgt.services.TenantMgtAdminService} - Error deleting tenant with domain: test7.tenant and tenant id: 136. {org.wso2.carbon.tenant.mgt.services.TenantMgtAdminService} 
java.lang.NullPointerException 
at org.wso2.carbon.tenant.mgt.services.TenantMgtAdminService.deleteTenant(TenantMgtAdminService.java:520) 

Looking at the source code, I think this might be a defect as the null pointer exception seems to be caused by trying to access a "billing service" around line 520.

So I wonder if I could configured my tenant in a way that this billing service would not be null, or of there is some other workaround?

Thanks

回答1:

Use deleteTenant operation in the RemoteTenantManagerService and restart the server. ;) Restarting the server will clear the cache and allow you to add new tenants with the same domain name.