The update organization method wraps the update organization API endpoint. This will update the logged-in Member's Organization.
Update Organization
Method parameters
organization_name string
organization_slug string
organization_logo_url string
email_jit_provisioning string
email_invites string
email_allowed_domains array[strings]
sso_default_connection_id string
sso_jit_provisioning string
sso_jit_provisioning_allowed_connections array[strings]
auth_methods string
allowed_auth_methods array[strings]
mfa_methods string
allowed_mfa_methods array[strings]
mfa_policy string
rbac_email_implicit_role_assignments array[object]
oauth_tenant_jit_provisioning string
allowed_oauth_tenants object
Response fields
request_id string
status_code int
organization object
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": {}
}
}