B2B Saas Authentication

/

Frontend SDKs

/

Headless

/

Members

/

Update Member

Update a Member

The Update Member method wraps the Update Member API endpoint. The organization_id will be automatically inferred from the logged-in Member's session. This method can be used to update any Member in the logged-in Member's Organization.

Use the Update Self method when when the Member is deleting their own password.


Method parameters


member_id*string

email_addressstring

namestring

untrusted_metadataobject

is_breakglassboolean

mfa_phone_numberstring

mfa_enrolledboolean

default_mfa_methodstring

rolesarray[strings]
import { useStytchB2BClient } from '@stytch/react/b2b';

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

  const updateMemberName = () => {
    stytch.organization.members.update({
      member_id: 'member-test-32fc5024-9c09-4da3-bd2e-c9ce4da9375f$',
      name: 'Jane Doe',
    });
  };

  return <button onClick={updateMemberName}>Update Member name</button>;
};

RESPONSE

200
{
  "status_code": 200,
  "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
  "member_id": "member-test-32fc5024-9c09-4da3-bd2e-c9ce4da9375f",
  "member": {...},
  "organization": {...}
}