B2B Saas Authentication

/

Frontend SDKs

/

Headless

/

Organizations

/

Update Organization

Update Organization

The update organization method wraps the update organization API endpoint. This will update the logged-in Member's Organization.


Method parameters


organization_namestring

organization_slugstring

organization_logo_urlstring

email_jit_provisioningstring

email_invitesstring

email_allowed_domainsarray[strings]

sso_default_connection_idstring

sso_jit_provisioningstring

sso_jit_provisioning_allowed_connectionsarray[strings]

auth_methodsstring

allowed_auth_methodsarray[strings]

mfa_methodsstring

allowed_mfa_methodsarray[strings]

mfa_policystring

rbac_email_implicit_role_assignmentsarray[object]

oauth_tenant_jit_provisioningstring

allowed_oauth_tenantsobject
import { useStytchB2BClient } from '@stytch/react/b2b';

export const UpdateOrganizationName = () => {
  const stytch = useStytchB2BClient();

  const updateOrganizationName = () => {
    stytch.organization.update({
      organization_name: 'Example Org Inc.',
    });
  };

  return <button onClick={updateOrganizationName}>Update your Organization's name</button>;
};

RESPONSE

200
{
  "status_code": 200,
  "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
  "organization": {
	"email_allowed_domains": [],
	"email_invites": "ALL_ALLOWED",
	"email_jit_provisioning": "ALL_ALLOWED",
	"mfa_policy": "OPTIONAL",
	"organization_id": "organization-test-07971b06-ac8b-4cdb-9c15-63b17e653931",
	"organization_logo_url": "",
	"organization_name": "Example Org Inc.",
	"organization_slug": "example-org",
	"sso_default_connection_id": null,
	"sso_jit_provisioning": "ALL_ALLOWED",
	"sso_jit_provisioning_allowed_connections": [],
	"sso_active_connections": [],
	"scim_active_connection": null,
	"trusted_metadata": {},
	"auth_methods": "ALL_ALLOWED",
    "allowed_auth_methods": [],
	"oauth_tenant_jit_provisioning": "NOT_ALLOWED",
	"allowed_oauth_tenants": {}
  }
}