Hi! Does the Descope node SDK allow for deactivati...
# ask-a-descoper
r
Hi! Does the Descope node SDK allow for deactivating and reactivating tenants? I can't find it in the documentation, but I see that the
update()
tenant method takes in a
disabled
parameter, would this update the
active
status?
✅ 1
d
Hi, I'm Descope's AI assistant. I've put together an initial response below based on your question. ### Tenant Management in Descope Node SDK #### Tenant
update()
Method • Parameters: ◦
id
: The tenant's ID ◦
name
: The tenant's name ◦
selfProvisioningDomains
: List of associated domains ◦
customAttributes
: Custom attribute key/value pairs • Note: There is no
disabled
parameter on
tenant.update()
, and the SDK does not provide dedicated methods for activating or deactivating tenants. #### Activate/Deactivate Functionality • The activate/deactivate pattern is applicable to access keys only: ◦ Activate Access Key:
descopeClient.management.accessKey.activate(id)
◦ Deactivate Access Key:
descopeClient.management.accessKey.deactivate(id)
#### Recommendations • If you need to enable/disable tenants, consider the following options: ◦ Use
tenant.delete()
(note: this action is irreversible). ◦ Manage tenant access at the user or access key level instead.
a
Hi @Rina Simcha The Node SDK's
tenant.update()
method doesn't currently expose the
disabled
parameter directly in its signature — so it won't affect the active status via that method. However, you have two other options: 1. Descope Console — You can activate or disable tenants directly from the Tenants page by clicking the three-dot menu on the tenant row. 2. Management REST API — The underlying API endpoint (
POST /v1/mgmt/tenant/update
) does support a
disabled
boolean field, so you can call it directly if you need to programmatically toggle tenant status. Docs: https://docs.descope.com/api/management/tenants/update-tenant Just let me know if you need any further assistance.
r
Copy code
update: (id: string, name: string, selfProvisioningDomains?: string[], customAttributes?: Record<string, AttributesTypes>, enforceSSO?: boolean, disabled?: boolean) => Promise<SdkResponse<never>>;
@Akash Jivane This definition is from the node SDK
a
Oh right, and I apologize for the confusion! The Node SDK does expose
disabled
as an optional parameter in
tenant.update()
. Passing
disabled: true
will deactivate the tenant, and
disabled: false
will reactivate it. Like:
Copy code
await descopeClient.management.tenant.update(
  'tenant-id',
  'Tenant Name',
  [], // selfProvisioningDomains
  {}, // customAttributes
  false, // enforceSSO
  true  // disabled — set to false to reactivate
);
r
Thank you 🙂 So all this does is update the 'active' status right?
a
Exactly!
🙌 1
r
Screenshot 2026-04-06 at 12.02.47 PM.png
🙌 1